From: Jason Rumney Date: Tue, 27 May 2008 08:30:02 +0000 (+0000) Subject: (w32font_open_internal): Determine if glyph indices are likely to work here. X-Git-Tag: emacs-pretest-23.0.90~5266 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=943f2093bfdf3b7e8d8cbe2f6e67c03ff76ae8f8;p=emacs.git (w32font_open_internal): Determine if glyph indices are likely to work here. --- diff --git a/src/ChangeLog b/src/ChangeLog index fdcbc3469c7..e9047f1a701 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-05-27 Jason Rumney + + * w32font.c (w32font_open_internal): Determine if glyph indices + are likely to work here. + 2008-05-27 Chong Yidong * xdisp.c (draw_glyphs): If mouse-highlighting is on, attempt to diff --git a/src/w32font.c b/src/w32font.c index 6639825e1af..413c103d6e4 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -796,11 +796,16 @@ w32font_open_internal (f, font_entity, pixel_size, font_object) sizeof (TEXTMETRIC)); else metrics = NULL; + + /* If it supports outline metrics, it should support Glyph Indices. */ + w32_font->glyph_idx = ETO_GLYPH_INDEX; } - if (!metrics) - GetTextMetrics (dc, &w32_font->metrics); - w32_font->glyph_idx = ETO_GLYPH_INDEX; + if (!metrics) + { + GetTextMetrics (dc, &w32_font->metrics); + w32_font->glyph_idx = 0; + } w32_font->cached_metrics = NULL; w32_font->n_cache_blocks = 0;