mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 03:50:21 +00:00
gdi32: Return 0 char width for missing glyphs.
Fixes a test failure with Emoji font: font.c:7147: Test failed: Noto Color Emoji: mismatched widths 2145357798/1.33654768e+008 Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7da087b76a
commit
aa90ed6df6
|
@ -8414,8 +8414,10 @@ static BOOL CDECL freetype_GetCharWidth( PHYSDEV dev, UINT firstChar, UINT lastC
|
|||
GDI_CheckNotLock();
|
||||
EnterCriticalSection( &freetype_cs );
|
||||
for(c = firstChar; c <= lastChar; c++) {
|
||||
get_glyph_outline( physdev->font, c, GGO_METRICS, &gm, &abc, 0, NULL, &identity );
|
||||
buffer[c - firstChar] = abc.abcA + abc.abcB + abc.abcC;
|
||||
if (get_glyph_outline( physdev->font, c, GGO_METRICS, &gm, &abc, 0, NULL, &identity ) == GDI_ERROR)
|
||||
buffer[c - firstChar] = 0;
|
||||
else
|
||||
buffer[c - firstChar] = abc.abcA + abc.abcB + abc.abcC;
|
||||
}
|
||||
LeaveCriticalSection( &freetype_cs );
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue