mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
gdi32: Use a separate variable to indicate the default has been retrieved.
This commit is contained in:
parent
54f71a0d8e
commit
b4430319f1
@ -4602,16 +4602,21 @@ DWORD WineEngGetGlyphIndices(GdiFont *font, LPCWSTR lpstr, INT count,
|
||||
LPWORD pgi, DWORD flags)
|
||||
{
|
||||
int i;
|
||||
int default_char = -1;
|
||||
WORD default_char;
|
||||
BOOL got_default = FALSE;
|
||||
|
||||
if (flags & GGI_MARK_NONEXISTING_GLYPHS) default_char = 0xffff; /* XP would use 0x1f for bitmap fonts */
|
||||
if (flags & GGI_MARK_NONEXISTING_GLYPHS)
|
||||
{
|
||||
default_char = 0xffff; /* XP would use 0x1f for bitmap fonts */
|
||||
got_default = TRUE;
|
||||
}
|
||||
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
pgi[i] = get_glyph_index(font, lpstr[i]);
|
||||
if (pgi[i] == 0)
|
||||
{
|
||||
if (default_char == -1)
|
||||
if (!got_default)
|
||||
{
|
||||
if (FT_IS_SFNT(font->ft_face))
|
||||
{
|
||||
@ -4624,6 +4629,7 @@ DWORD WineEngGetGlyphIndices(GdiFont *font, LPCWSTR lpstr, INT count,
|
||||
WineEngGetTextMetrics(font, &textm);
|
||||
default_char = textm.tmDefaultChar;
|
||||
}
|
||||
got_default = TRUE;
|
||||
}
|
||||
pgi[i] = default_char;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user