diff options
author | Eli Zaretskii <eliz@gnu.org> | 2015-05-26 18:29:40 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2015-05-26 18:29:40 +0300 |
commit | 53bedd3a8eb7169b734ee8925c76712c68d9c4fc (patch) | |
tree | a36ee973a6163d8281ebf00ba21e01d1b064b8d5 /src/w32font.h | |
parent | 45c92ddd99f5d3ceb520f9a27678bbedde83589b (diff) | |
download | emacs-53bedd3a8eb7169b734ee8925c76712c68d9c4fc.tar.gz |
Teach MS-Windows font back-end return per-glyph ascent/descent
* src/w32font.h (struct w32_metric_cache): Add ascent and descent
values.
* src/w32font.c (w32font_text_extents): Compute, cache, and
accumulate per-glyph ascent and descent values, instead of copying
global values from the font. If the values are not available from
the font data, i.e., non-TTF fonts, fall back on font-global values.
(compute_metrics): Compute and return per-glyph ascent and descent
values, if returned by GetGlyphOutlineW, falling back on
font-global values. (Bug#20628)
* src/w32term.c (w32_draw_rectangle): Add 1 pixel to width and
height of rectangle to be drawn, to be compatible with
XDrawRectangle. Fixes glyphless-char display as hex codes in a
box, when per-glyph ascent/descent values are used.
Diffstat (limited to 'src/w32font.h')
-rw-r--r-- | src/w32font.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/w32font.h b/src/w32font.h index 0ad01254be9..6365cb3fa23 100644 --- a/src/w32font.h +++ b/src/w32font.h @@ -37,7 +37,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ struct w32_metric_cache { - short lbearing, rbearing, width; + short lbearing, rbearing, width, ascent, descent; unsigned char status; }; |