Mercurial > emacs
comparison src/w32font.c @ 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 | 3d4da4481f75 |
children | 5602389abb69 |
comparison
equal
deleted
inserted
replaced
95338:b4a9f05bf87b | 95339:48f990d65758 |
---|---|
794 if (GetOutlineTextMetrics (dc, len, metrics)) | 794 if (GetOutlineTextMetrics (dc, len, metrics)) |
795 bcopy (&metrics->otmTextMetrics, &w32_font->metrics, | 795 bcopy (&metrics->otmTextMetrics, &w32_font->metrics, |
796 sizeof (TEXTMETRIC)); | 796 sizeof (TEXTMETRIC)); |
797 else | 797 else |
798 metrics = NULL; | 798 metrics = NULL; |
799 } | 799 |
800 /* If it supports outline metrics, it should support Glyph Indices. */ | |
801 w32_font->glyph_idx = ETO_GLYPH_INDEX; | |
802 } | |
803 | |
800 if (!metrics) | 804 if (!metrics) |
801 GetTextMetrics (dc, &w32_font->metrics); | 805 { |
802 | 806 GetTextMetrics (dc, &w32_font->metrics); |
803 w32_font->glyph_idx = ETO_GLYPH_INDEX; | 807 w32_font->glyph_idx = 0; |
808 } | |
804 | 809 |
805 w32_font->cached_metrics = NULL; | 810 w32_font->cached_metrics = NULL; |
806 w32_font->n_cache_blocks = 0; | 811 w32_font->n_cache_blocks = 0; |
807 | 812 |
808 SelectObject (dc, old_font); | 813 SelectObject (dc, old_font); |