Jeff L lats@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 wrote:
Jeff L lats@yless4u.com.au writes:
/* 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, I can fix the multiple calls but I think I need to make the call unless there is another way. Is making the call acceptable as in the updated patch?
Jeff