Module: wine Branch: master Commit: 4e760d89142eabae3f1704174b3040642d2d9d73 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e760d89142eabae3f1704174b...
Author: Aric Stewart aric@codeweavers.com Date: Tue Sep 6 07:17:59 2011 -0500
usp10: Disable glyph indexes for Symbol, non-TrueType, and device fonts.
---
dlls/usp10/usp10.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 61f65e4..873d10b 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1050,9 +1050,6 @@ static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa, (cEnd >= 0 && analysis->pItem[iItem].iCharPos >= cEnd)) return S_OK;
- uOptions |= ETO_GLYPH_INDEX; - analysis->pItem[0].a.fNoGlyphIndex = FALSE; /* say that we have glyphs */ - if (fSelected) { BkMode = GetBkMode(analysis->hdc); @@ -1728,6 +1725,13 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc, ((ScriptCache *)*psc)->userScript = tagScript; ((ScriptCache *)*psc)->userLang = tagLangSys;
+ /* set fNoGlyphIndex for symbolic, and device fonts or non truetype fonts */ + if (!psa->fNoGlyphIndex && + (!(get_cache_pitch_family(psc) & TMPF_TRUETYPE) || + (get_cache_pitch_family(psc) & TMPF_DEVICE) || + (((ScriptCache *)*psc)->tm.tmCharSet == SYMBOL_CHARSET))) + psa->fNoGlyphIndex = TRUE; + /* Initialize a SCRIPT_VISATTR and LogClust for each char in this run */ for (i = 0; i < cChars; i++) { @@ -1773,12 +1777,9 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc, rChars[i] = chInput; }
- if (get_cache_pitch_family(psc) & TMPF_TRUETYPE) - { - SHAPE_ContextualShaping(hdc, (ScriptCache *)*psc, psa, rChars, cChars, pwOutGlyphs, pcGlyphs, cMaxGlyphs, pwLogClust); - SHAPE_ApplyDefaultOpentypeFeatures(hdc, (ScriptCache *)*psc, psa, pwOutGlyphs, pcGlyphs, cMaxGlyphs, cChars, pwLogClust); - SHAPE_CharGlyphProp(hdc, (ScriptCache *)*psc, psa, pwcChars, cChars, pwOutGlyphs, *pcGlyphs, pwLogClust, pCharProps, pOutGlyphProps); - } + SHAPE_ContextualShaping(hdc, (ScriptCache *)*psc, psa, rChars, cChars, pwOutGlyphs, pcGlyphs, cMaxGlyphs, pwLogClust); + SHAPE_ApplyDefaultOpentypeFeatures(hdc, (ScriptCache *)*psc, psa, pwOutGlyphs, pcGlyphs, cMaxGlyphs, cChars, pwLogClust); + SHAPE_CharGlyphProp(hdc, (ScriptCache *)*psc, psa, pwcChars, cChars, pwOutGlyphs, *pcGlyphs, pwLogClust, pCharProps, pOutGlyphProps); heap_free(rChars); } else