Module: wine Branch: master Commit: 7ccf31bde84f28ff03698d6ae9d34dc67290bb18 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7ccf31bde84f28ff03698d6ae9...
Author: Aric Stewart aric@codeweavers.com Date: Wed Sep 14 08:53:05 2011 -0500
usp10: Set fNoGlyphIndex only if the fonts has no opentype/truetype tables.
---
dlls/usp10/usp10.c | 8 +++----- dlls/usp10/usp10_internal.h | 1 + 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 9095fe3..fe8f6a8 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -427,6 +427,7 @@ static HRESULT init_script_cache(const HDC hdc, SCRIPT_CACHE *psc) heap_free(sc); return E_INVALIDARG; } + sc->sfnt = (GetFontData(hdc, MS_MAKE_TAG('h','e','a','d'), 0, NULL, 0)!=GDI_ERROR); *psc = sc; TRACE("<- %p\n", sc); return S_OK; @@ -1747,11 +1748,8 @@ 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))) + /* set fNoGlyphIndex non truetype/opentype fonts */ + if (!psa->fNoGlyphIndex && !((ScriptCache *)*psc)->sfnt) psa->fNoGlyphIndex = TRUE;
/* Initialize a SCRIPT_VISATTR and LogClust for each char in this run */ diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index 09ffc65..e85afbe 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -85,6 +85,7 @@ typedef struct { typedef struct { LOGFONTW lf; TEXTMETRICW tm; + BOOL sfnt; WORD *glyphs[GLYPH_MAX / GLYPH_BLOCK_SIZE]; ABC *widths[GLYPH_MAX / GLYPH_BLOCK_SIZE]; LPVOID GSUB_Table;