ScriptGetFontLanguageTags function (usp10.h)
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 comprising the list are retrieved from the font in the specified device context or cache.
Syntax
HRESULT ScriptGetFontLanguageTags(
[in, optional] HDC hdc,
[in, out] SCRIPT_CACHE *psc,
[in, optional] SCRIPT_ANALYSIS *psa,
[in] OPENTYPE_TAG tagScript,
[in] int cMaxTags,
[out] OPENTYPE_TAG *pLangsysTags,
[out] int *pcTags
);
Parameters
[in, optional] hdc
Handle to the device context. For more information, see Caching.
[in, out] psc
Pointer to a SCRIPT_CACHE structure identifying the script cache.
[in, optional] psa
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 set this parameter to NULL to retrieve unfiltered results.
[in] tagScript
An OPENTYPE_TAG structure defining the script tag for which the list of associated language tags is requested.
[in] cMaxTags
The length of the array specified by pLangSysTags.
[out] pLangsysTags
Pointer to a buffer in which this function retrieves an array of OPENTYPE_TAG structures identifying the language tags matching input criteria.
[out] pcTags
Pointer to the number of elements in the language tag array.
Return value
Returns 0 if successful. The function returns a nonzero HRESULT value if it does not succeed. 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 try calling 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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | usp10.h |
Library | Usp10.lib |
DLL | Usp10.dll |
Redistributable | Usp10.dll version 1.600 or greater on Windows XP |