Commit 6c43ef46 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

usp10: Properly handle fonts with scripts without a default language.

parent 0e532633
......@@ -924,10 +924,15 @@ static void GSUB_initialize_language_cache(LoadedScript *script)
if (!script->language_count)
{
DWORD offset;
const GSUB_Script* table = script->table;
script->language_count = GET_BE_WORD(table->LangSysCount);
script->default_language.tag = MS_MAKE_TAG('d','f','l','t');
script->default_language.table = (const BYTE*)table + GET_BE_WORD(table->DefaultLangSys);
offset = GET_BE_WORD(table->DefaultLangSys);
if (offset)
{
script->default_language.tag = MS_MAKE_TAG('d','f','l','t');
script->default_language.table = (const BYTE*)table + offset;
}
if (script->language_count)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment