[PATCH v2] usp10: Don't specify ETO_GLYPH_INDEX for bitmap fonts.
This patch uses same check as ScriptShapeOpenType() does, and fixes painting of non-latin characters in Wordpad using MS Sans Serif font. v2: SCRIPT_CACHE pointer could be NULL. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/usp10/usp10.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 322091c547..a6664279b5 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -3607,10 +3607,10 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN if (!hdc || !psc) return E_INVALIDARG; if (!piAdvance || !psa || !pwGlyphs) return E_INVALIDARG; - fuOptions &= ETO_CLIPPED + ETO_OPAQUE; + fuOptions &= ETO_CLIPPED | ETO_OPAQUE; fuOptions |= ETO_IGNORELANGUAGE; - if (!psa->fNoGlyphIndex) /* Have Glyphs? */ - fuOptions |= ETO_GLYPH_INDEX; /* Say don't do translation to glyph */ + if (!psa->fNoGlyphIndex && *psc && ((ScriptCache *)*psc)->sfnt) + fuOptions |= ETO_GLYPH_INDEX; /* We do actually have glyph indices */ if (!(lpDx = heap_calloc(cGlyphs, 2 * sizeof(*lpDx)))) return E_OUTOFMEMORY; -- 2.26.2
Signed-off-by: Aric Stewart <aric(a)codeweavers.com> On 7/21/20 5:57 AM, Dmitry Timoshkov wrote:
This patch uses same check as ScriptShapeOpenType() does, and fixes painting of non-latin characters in Wordpad using MS Sans Serif font.
v2: SCRIPT_CACHE pointer could be NULL.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/usp10/usp10.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 322091c547..a6664279b5 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -3607,10 +3607,10 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN if (!hdc || !psc) return E_INVALIDARG; if (!piAdvance || !psa || !pwGlyphs) return E_INVALIDARG;
- fuOptions &= ETO_CLIPPED + ETO_OPAQUE; + fuOptions &= ETO_CLIPPED | ETO_OPAQUE; fuOptions |= ETO_IGNORELANGUAGE; - if (!psa->fNoGlyphIndex) /* Have Glyphs? */ - fuOptions |= ETO_GLYPH_INDEX; /* Say don't do translation to glyph */ + if (!psa->fNoGlyphIndex && *psc && ((ScriptCache *)*psc)->sfnt) + fuOptions |= ETO_GLYPH_INDEX; /* We do actually have glyph indices */
if (!(lpDx = heap_calloc(cGlyphs, 2 * sizeof(*lpDx)))) return E_OUTOFMEMORY;
participants (2)
-
Aric Stewart -
Dmitry Timoshkov