if (retval)
{
+ /* Don't trust the ABC widths. For synthesized fonts they are
+ wrong, and so is the result of GetCharWidth()! */
+ int real_width;
+ GetCharWidth (hdc, *char2b, *char2b, &real_width);
+
pcm->width = char_widths.abcA + char_widths.abcB + char_widths.abcC;
+
+ /* As far as I can tell, this is the best way to determine what
+ ExtTextOut will do with the broken font. */
+ if (pcm->width != real_width)
+ pcm->width = (pcm->width + real_width) / 2;
+
pcm->lbearing = char_widths.abcA;
pcm->rbearing = pcm->width - char_widths.abcC;
pcm->ascent = FONT_BASE (font);