diff options
| author | Eli Zaretskii | 2010-11-13 15:29:31 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2010-11-13 15:29:31 +0200 |
| commit | 0eb025fb55277c038c39e7325a556de46ecbd2e4 (patch) | |
| tree | 677650021eae4915030d38baabe6c872eaa31845 /src/w32term.c | |
| parent | 6e060cee8186d9fe5ad5f8a783d45f80f9b1bbe3 (diff) | |
| download | emacs-0eb025fb55277c038c39e7325a556de46ecbd2e4.tar.gz emacs-0eb025fb55277c038c39e7325a556de46ecbd2e4.zip | |
Fix and document display of glyphless characters.
src/xdisp.c (set_cursor_from_row): Fix cursor positioning on
zero-width characters.
(syms_of_xdisp) <glyphless-char-display>: Doc fix.
src/.gdbinit (pgx): Adapt to latest changes in `struct glyph'.
src/w32term.c (x_draw_glyphless_glyph_string_foreground): Draw the
box before drawing the glyphs inside it.
src/dispextern.h (enum glyphless_display_method): Rename
GLYPHLESS_DISPLAY_HEXA_CODE to GLYPHLESS_DISPLAY_HEX_CODE. All
users changed.
src/term.c (append_glyphless_glyph, produce_glyphless_glyph): Fix
comments.
(produce_glyphless_glyph): Enclose "U+nnnn" and "empty box"
whitespace in "[]", to simulate a box. Don't use uninitialized
variable `width'.
lisp/international/characters.el (glyphless-char-display-control):
Renamed from glyphless-char-control; all users changed. Doc fix.
Signal an error if display method is not one of the recognized
symbols.
doc/emacs/rmail.texi (Rmail Coding): Characters with no fonts are not
necessarily displayed as empty boxes.
doc/emacs/mule.texi (Language Environments, Fontsets): Characters with no
fonts are not necessarily displayed as empty boxes.
doc/emacs/display.texi (Text Display): Document display of glyphless
characters.
doc/lispref/display.texi (Usual Display): Characters with no fonts are not
necessarily displayed as empty boxes.
etc/NEWS: Document display of glyphless characters.
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/w32term.c b/src/w32term.c index a93bc064c39..33b60c568c0 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -1440,7 +1440,7 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s) | |||
| 1440 | str = (char *) SDATA (acronym); | 1440 | str = (char *) SDATA (acronym); |
| 1441 | } | 1441 | } |
| 1442 | } | 1442 | } |
| 1443 | else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEXA_CODE) | 1443 | else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE) |
| 1444 | { | 1444 | { |
| 1445 | sprintf ((char *) buf, "%0*X", | 1445 | sprintf ((char *) buf, "%0*X", |
| 1446 | glyph->u.glyphless.ch < 0x10000 ? 4 : 6, | 1446 | glyph->u.glyphless.ch < 0x10000 ? 4 : 6, |
| @@ -1448,6 +1448,11 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s) | |||
| 1448 | str = buf; | 1448 | str = buf; |
| 1449 | } | 1449 | } |
| 1450 | 1450 | ||
| 1451 | if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE) | ||
| 1452 | w32_draw_rectangle (s->hdc, s->gc, | ||
| 1453 | x, s->ybase - glyph->ascent, | ||
| 1454 | glyph->pixel_width - 1, | ||
| 1455 | glyph->ascent + glyph->descent - 1); | ||
| 1451 | if (str) | 1456 | if (str) |
| 1452 | { | 1457 | { |
| 1453 | struct font *font = s->font; | 1458 | struct font *font = s->font; |
| @@ -1456,7 +1461,7 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s) | |||
| 1456 | HFONT old_font; | 1461 | HFONT old_font; |
| 1457 | 1462 | ||
| 1458 | old_font = SelectObject (s->hdc, FONT_HANDLE (font)); | 1463 | old_font = SelectObject (s->hdc, FONT_HANDLE (font)); |
| 1459 | /* It is assured that all LEN characters in STR is ASCII. */ | 1464 | /* It is certain that all LEN characters in STR are ASCII. */ |
| 1460 | for (j = 0; j < len; j++) | 1465 | for (j = 0; j < len; j++) |
| 1461 | { | 1466 | { |
| 1462 | code = font->driver->encode_char (font, str[j]); | 1467 | code = font->driver->encode_char (font, str[j]); |
| @@ -1472,11 +1477,6 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s) | |||
| 1472 | with_background); | 1477 | with_background); |
| 1473 | SelectObject (s->hdc, old_font); | 1478 | SelectObject (s->hdc, old_font); |
| 1474 | } | 1479 | } |
| 1475 | if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE) | ||
| 1476 | w32_draw_rectangle (s->hdc, s->gc, | ||
| 1477 | x, s->ybase - glyph->ascent, | ||
| 1478 | glyph->pixel_width - 1, | ||
| 1479 | glyph->ascent + glyph->descent - 1); | ||
| 1480 | x += glyph->pixel_width; | 1480 | x += glyph->pixel_width; |
| 1481 | } | 1481 | } |
| 1482 | } | 1482 | } |