gdi: resend add missing glyph code to GetGlyphIndices
Alexandre Julliard
julliard at winehq.org
Wed Aug 23 04:30:40 CDT 2006
Jeff L <lats at yless4u.com.au> writes:
> for(i = 0; i < count; i++)
> + {
> pgi[i] = get_glyph_index(font, lpstr[i]);
> -
> + if (pgi[i] == 0)
> + {
> + if (flags & GGI_MARK_NONEXISTING_GLYPHS)
> + pgi[i] = 0x001f; /* Indicate non existance */
> + else
> + {
> + /* Note that the call to GetTextMetricsW is made in the loop *
> + * because it is less likely to have non existant glyphs *
> + * and hence we should have few calls to GetTextMetricsW as *
> + * a result */
> + GetTextMetricsW(hdc, &textm);
> + pgi[i] = textm.tmDefaultChar;
It's a good idea to not call GetTextMetrics unless you need it, but
there's no reason to call it multiple times. It isn't hard to call it
only the first time you need the default char.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list