From 943f2093bfdf3b7e8d8cbe2f6e67c03ff76ae8f8 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 27 May 2008 08:30:02 +0000 Subject: [PATCH] (w32font_open_internal): Determine if glyph indices are likely to work here. --- src/ChangeLog | 5 +++++ src/w32font.c | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) 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; -- 2.39.2