changeset 95339:48f990d65758

(w32font_open_internal): Determine if glyph indices are likely to work here.
author Jason Rumney <jasonr@gnu.org>
date Tue, 27 May 2008 08:29:41 +0000
parents b4a9f05bf87b
children c2e8bb750d17
files src/w32font.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32font.c	Tue May 27 05:36:03 2008 +0000
+++ b/src/w32font.c	Tue May 27 08:29:41 2008 +0000
@@ -796,11 +796,16 @@
                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;
+    {
+      GetTextMetrics (dc, &w32_font->metrics);
+      w32_font->glyph_idx = 0;
+    }
 
   w32_font->cached_metrics = NULL;
   w32_font->n_cache_blocks = 0;