Search code examples
winapidirectxsharpdxtext-renderingdirectwrite

DirectWrite ScriptAnalysis get script name from index


DirectWrite ScriptAnalysis Contains a UINT16 number that is zero-based index representation of writing system script.

How can I know the name of the script? For example in English the number is equal to 49, and in Russian the number is equal to 22.

Is there a table of all languages somewhere?


Solution

  • By using IDWriteTextAnalyzer1::GetScriptProperties() you'll get ISO codes. The table of languages can be found on the Unicode.org site. It is called "Codes for the representation of names of scripts" Here is the link for that: http://unicode.org/iso15924/iso15924-codes.html