aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2007-10-26 23:50:29 +0000
committerJason Rumney2007-10-26 23:50:29 +0000
commit20a2b75666b5343b65c1dc78f11b206a4558d931 (patch)
tree8b9bbf774632c0743b2c080eed376dd3101cb5d1 /src
parentb03cb2106e74d00caf23d476272c7864c454b22f (diff)
downloademacs-20a2b75666b5343b65c1dc78f11b206a4558d931.tar.gz
emacs-20a2b75666b5343b65c1dc78f11b206a4558d931.zip
(add_font_name_to_list): Avoid vertical fonts.
(font_matches_spec): Remove debug output. (add_font_entity_to_list): Avoid using substituted fonts.
Diffstat (limited to 'src')
-rw-r--r--src/w32font.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/w32font.c b/src/w32font.c
index 16ae98f13bb..5c3f6b7af08 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -639,8 +639,14 @@ add_font_name_to_list (logical_font, physical_font, font_type, list_object)
639 LPARAM list_object; 639 LPARAM list_object;
640{ 640{
641 Lisp_Object* list = (Lisp_Object *) list_object; 641 Lisp_Object* list = (Lisp_Object *) list_object;
642 Lisp_Object family = intern_downcase (logical_font->elfLogFont.lfFaceName, 642 Lisp_Object family;
643 strlen (logical_font->elfLogFont.lfFaceName)); 643
644 /* Skip vertical fonts (intended only for printing) */
645 if (logical_font->elfLogFont.lfFaceName[0] == '@')
646 return 1;
647
648 family = intern_downcase (logical_font->elfLogFont.lfFaceName,
649 strlen (logical_font->elfLogFont.lfFaceName));
644 if (! memq_no_quit (family, *list)) 650 if (! memq_no_quit (family, *list))
645 *list = Fcons (family, *list); 651 *list = Fcons (family, *list);
646 652
@@ -785,10 +791,7 @@ font_matches_spec (type, font, spec)
785 int slant = XINT (val); 791 int slant = XINT (val);
786 if ((slant > 150 && !font->ntmTm.tmItalic) 792 if ((slant > 150 && !font->ntmTm.tmItalic)
787 || (slant <= 150 && font->ntmTm.tmItalic)) 793 || (slant <= 150 && font->ntmTm.tmItalic))
788 {
789 OutputDebugString ("italic mismatch");
790 return 0; 794 return 0;
791 }
792 } 795 }
793 796
794 /* Check extra parameters. */ 797 /* Check extra parameters. */
@@ -944,7 +947,11 @@ add_font_entity_to_list (logical_font, physical_font, font_type, lParam)
944 947
945 if (logfonts_match (&logical_font->elfLogFont, &match_data->pattern) 948 if (logfonts_match (&logical_font->elfLogFont, &match_data->pattern)
946 && font_matches_spec (font_type, physical_font, 949 && font_matches_spec (font_type, physical_font,
947 match_data->orig_font_spec)) 950 match_data->orig_font_spec)
951 /* Avoid Windows substitution so we can control substitution with
952 alternate-fontname-alist. */
953 && !strnicmp (&logical_font->elfFullName,
954 &match_data->pattern.lfFaceName, LF_FACESIZE))
948 { 955 {
949 Lisp_Object entity 956 Lisp_Object entity
950 = w32_enumfont_pattern_entity (match_data->frame, logical_font, 957 = w32_enumfont_pattern_entity (match_data->frame, logical_font,