From dtimoshkov на etersoft.ru Wed May 23 10:20:53 2018 From: dtimoshkov на etersoft.ru (Dmitry Timoshkov) Date: Wed, 23 May 2018 15:20:53 +0800 Subject: [Wine-patches] [eter-2.1] gdi32: Pick first charmap if none was selected using preferred encoding (eterbug #12900). Message-ID: <20180523152053.497a76c4e3d80f36ee9e1d51@etersoft.ru> From: Nikolay Sivov FreeType 2.8.1 has similar logic removed from WinFNT module, that always pre-selected first charmap. --- dlls/gdi32/freetype.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index e7705194ee..223f7092ab 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -4604,6 +4604,13 @@ static FT_Encoding pick_charmap( FT_Face face, int charset ) if (select_charmap( face, *encs )) break; encs++; } + + if (!face->charmap && face->num_charmaps) + { + if (!pFT_Set_Charmap(face, face->charmaps[0])) + return face->charmap->encoding; + } + return *encs; } -- 2.16.3 -- Dmitry.