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,7 +8414,9 @@ static BOOL CDECL freetype_GetCharWidth( PHYSDEV dev, UINT firstChar, UINT lastC
|
||||||
GDI_CheckNotLock();
|
GDI_CheckNotLock();
|
||||||
EnterCriticalSection( &freetype_cs );
|
EnterCriticalSection( &freetype_cs );
|
||||||
for(c = firstChar; c <= lastChar; c++) {
|
for(c = firstChar; c <= lastChar; c++) {
|
||||||
get_glyph_outline( physdev->font, c, GGO_METRICS, &gm, &abc, 0, NULL, &identity );
|
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;
|
buffer[c - firstChar] = abc.abcA + abc.abcB + abc.abcC;
|
||||||
}
|
}
|
||||||
LeaveCriticalSection( &freetype_cs );
|
LeaveCriticalSection( &freetype_cs );
|
||||||
|
|
Loading…
Reference in New Issue