Commit aa90ed6d authored by Alexandre Julliard's avatar Alexandre Julliard

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: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 7da087b7
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment