ScriptGetFontLanguageTags (Compact 2013)

3/28/2014

This function retrieves a list of language tags that are available for the specified item and are supported by a specified script tag for OpenType processing. The tags are retrieved from the font in the specified device context or cache.

Syntax

HRESULT ScriptGetFontLanguageTags(
  HDC hdc,
  SCRIPT_CACHE* psc,
  SCRIPT_ANALYSIS* psa,
  OPENTYPE_TAG tagScript,
  int cMaxTags,
  OPENTYPE_TAG* pLangSysTags,
  int* pcTags
);

Parameters

  • hdc
    [in] Optional. Handle to the device context.
  • psc
    [in/out] Pointer to a SCRIPT_CACHE structure identifying the script cache.
  • psa
    [in] Pointer to a SCRIPT_ANALYSIS structure obtained from a previous call to ScriptItemizeOpenType. This parameter identifies the shaping engine, so that the font-language tags for the appropriate font and scripts can be retrieved.

    Alternately, the application can supply a null pointer to retrieve unfiltered results.

  • tagScript
    [in] An OPENTYPE_TAG structure defining the script tag for which the list of associated language tags is requested.
  • cMaxTags
    [in] The length of the array specified by pLangSysTags.
  • pLangSysTags
    [out] Pointer to a buffer in which this function retrieves an array of OPENTYPE_TAG structures identifying the language tags matching the input criteria.
  • pcTags
    [out] Pointer to the number of elements in the language-tag array.

Return Values

If the function is successful, it returns 0. If it does not succeed, it returns a nonzero HRESULT value. The application can test the return value with the SUCCEEDED and FAILED macros.

If the number of matching tags exceeds cMaxTags, the function fails with E_OUTOFMEMORY. The application can call the function again with larger buffers.

Remarks

While formally declared as a ULONG type, the OPENTYPE_TAG structure contains a 4-byte array that contains four 8-bit ASCII values of space, A-Z, or a-z. For example, the language tags for Romanian, Urdu, and Persian are "ROM ", "URD ", and "FAR ", respectively. Note that each tag ends with a space.

Requirements

Header

usp10.h

Library

Uspce.lib

See Also

Reference

Uniscribe Functions
SCRIPT_CACHE
SCRIPT_ANALYSIS
ScriptItemizeOpenType
OPENTYPE_TAG