Mercurial > emacs
comparison src/w32font.c @ 91070:2060802cc53f
(add_font_name_to_list): Avoid vertical fonts.
(font_matches_spec): Remove debug output.
(add_font_entity_to_list): Avoid using substituted fonts.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Fri, 26 Oct 2007 23:50:29 +0000 |
parents | fe9053c62d68 |
children | b656aee8436b |
comparison
equal
deleted
inserted
replaced
91069:6277bc0e513a | 91070:2060802cc53f |
---|---|
637 NEWTEXTMETRICEX *physical_font; | 637 NEWTEXTMETRICEX *physical_font; |
638 DWORD font_type; | 638 DWORD font_type; |
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 |
647 return 1; | 653 return 1; |
648 } | 654 } |
783 if (INTEGERP (val)) | 789 if (INTEGERP (val)) |
784 { | 790 { |
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. */ |
795 for (extra = AREF (spec, FONT_EXTRA_INDEX); | 798 for (extra = AREF (spec, FONT_EXTRA_INDEX); |
796 CONSP (extra); extra = XCDR (extra)) | 799 CONSP (extra); extra = XCDR (extra)) |
942 struct font_callback_data *match_data | 945 struct font_callback_data *match_data |
943 = (struct font_callback_data *) lParam; | 946 = (struct font_callback_data *) 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, |
951 physical_font, font_type); | 958 physical_font, font_type); |
952 if (!NILP (entity)) | 959 if (!NILP (entity)) |