usp10: Do not try to fallback if no fallback font is specified.
This commit is contained in:
parent
5086bb2cd9
commit
6fe14a0153
|
@ -1719,12 +1719,16 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
|
||||||
LOGFONTW lf;
|
LOGFONTW lf;
|
||||||
GetObjectW(GetCurrentObject(hdc, OBJ_FONT), sizeof(lf), & lf);
|
GetObjectW(GetCurrentObject(hdc, OBJ_FONT), sizeof(lf), & lf);
|
||||||
lf.lfCharSet = scriptInformation[analysis->pItem[i].a.eScript].props.bCharSet;
|
lf.lfCharSet = scriptInformation[analysis->pItem[i].a.eScript].props.bCharSet;
|
||||||
|
lf.lfFaceName[0] = 0;
|
||||||
find_fallback_font(analysis->pItem[i].a.eScript, lf.lfFaceName);
|
find_fallback_font(analysis->pItem[i].a.eScript, lf.lfFaceName);
|
||||||
analysis->glyphs[i].fallbackFont = CreateFontIndirectW(&lf);
|
if (lf.lfFaceName[0])
|
||||||
if (analysis->glyphs[i].fallbackFont)
|
|
||||||
{
|
{
|
||||||
ScriptFreeCache(sc);
|
analysis->glyphs[i].fallbackFont = CreateFontIndirectW(&lf);
|
||||||
originalFont = SelectObject(hdc, analysis->glyphs[i].fallbackFont);
|
if (analysis->glyphs[i].fallbackFont)
|
||||||
|
{
|
||||||
|
ScriptFreeCache(sc);
|
||||||
|
originalFont = SelectObject(hdc, analysis->glyphs[i].fallbackFont);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue