Mercurial > emacs
changeset 24733:8f526771b25b
(dumpglyphs): Use correct colours for drawing rectangles in place of
missing fonts, and make them the right size.
author | Andrew Innes <andrewi@gnu.org> |
---|---|
date | Sat, 15 May 1999 17:39:26 +0000 |
parents | b2451ff2b19e |
children | 1a05fdaa603b |
files | src/w32term.c |
diffstat | 1 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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);