# HG changeset patch # User Andrew Innes # Date 926789966 0 # Node ID 8f526771b25b6b679ac6b67e15c6d738d84f9fea # Parent b2451ff2b19ec5adbd53d4dcef55246842121b3a (dumpglyphs): Use correct colours for drawing rectangles in place of missing fonts, and make them the right size. diff -r b2451ff2b19e -r 8f526771b25b src/w32term.c --- a/src/w32term.c Sat May 15 06:04:46 1999 +0000 +++ b/src/w32term.c Sat May 15 17:39:26 1999 +0000 @@ -1016,7 +1016,7 @@ if (font) { if (font->hfont) - SelectObject (hdc, font->hfont); + SelectObject (hdc, font->hfont); if (!cmpcharp) { @@ -1233,11 +1233,22 @@ { /* Show rectangles to indicate that we found no font. */ int limit = cmpcharp ? 1 : len; + HBRUSH hb, oldhb; + HPEN hp, oldhp; + hb = CreateSolidBrush (bg); + hp = CreatePen (PS_SOLID, 0, fg); + oldhb = SelectObject(hdc, hb); + oldhp = SelectObject(hdc, hp); for (i = 0; i < limit; i++) Rectangle (hdc, left + glyph_width * i, top, - left + glyph_width * (i + 1) - 1, - top + line_height - 1); + left + glyph_width * (i + 1), + top + line_height); + + SelectObject(hdc, oldhb); + SelectObject(hdc, oldhp); + DeleteObject (hb); + DeleteObject (hp); } else if (require_clipping && !NILP (Vhighlight_wrong_size_font)) { @@ -1252,6 +1263,7 @@ top + line_height - 3, 1, 2); } } + { /* Setting underline position based on the metric of the current font results in shaky underline if it strides @@ -1272,7 +1284,7 @@ } if (!cmpcharp) - left += run_width; + left += run_width; } } release_frame_dc (f, hdc);