]> git.eshelyaron.com Git - emacs.git/commitdiff
(check_face_name): Check for fake helv. (Bug#2275)
authorJason Rumney <jasonr@gnu.org>
Thu, 12 Feb 2009 15:00:26 +0000 (15:00 +0000)
committerJason Rumney <jasonr@gnu.org>
Thu, 12 Feb 2009 15:00:26 +0000 (15:00 +0000)
(add_font_entity_to_list): Call check_face_name even when family
is unspecified.

src/ChangeLog
src/w32font.c

index 5b6f0a6016acd20cab8132c601c135dcb5245e66..dc38aa05bc7a1100032c58fd7b285485339d80dd 100644 (file)
@@ -1,11 +1,15 @@
 2009-02-12  Jason Rumney  <jasonr@gnu.org>
 
+       * w32font.c (check_face_name): Check for fake helv.  (Bug#2275)
+       (add_font_entity_to_list): Call check_face_name even when family
+       is unspecified.
+
        * w32term.c (x_display_pixel_height, x_display_pixel_width):
        Release DC when finished.  Use NULL window to refer to desktop.
-       (w32_term_init): Use NULL window to refer to desktop. (Bug#460)
+       (w32_term_init): Use NULL window to refer to desktop.  (Bug#460)
 
        * w32font.c (add_font_entity_to_list): Fix check for substituted
-       raster fonts. (Bug#2219)
+       raster fonts.  (Bug#2219)
 
 2009-02-12  Kenichi Handa  <handa@m17n.org>
 
index d28483ada1edc47736ed7631e5fd345435eb0fd2..848da7f464d31662cc6f083bf05c4067e74ca558 100644 (file)
@@ -1374,6 +1374,14 @@ check_face_name (font, full_name)
       _strlwr (full_iname);
       return strstr ("helvetica", full_iname) != NULL;
     }
+  /* Same for Helv.  */
+  if (!xstrcasecmp (font->lfFaceName, "helv"))
+    {
+      strncpy (full_iname, full_name, LF_FULLFACESIZE);
+      full_iname[LF_FULLFACESIZE] = 0;
+      _strlwr (full_iname);
+      return strstr ("helv", full_iname) != NULL;
+    }
 
   /* Since Times is mapped to Times New Roman, a substring
      match is not sufficient to filter out the bogus match.  */
@@ -1437,9 +1445,8 @@ add_font_entity_to_list (logical_font, physical_font, font_type, lParam)
                   logical_font->elfLogFont.lfFaceName))
       /* Check for well known substitutions that mess things up in the
         presence of Type-1 fonts of the same name.  */
-      || (match_data->pattern.lfFaceName[0]
-         && !check_face_name (&logical_font->elfLogFont,
-                              logical_font->elfFullName)))
+      || (!check_face_name (&logical_font->elfLogFont,
+                           logical_font->elfFullName)))
     return 1;
 
   /* Make a font entity for the font.  */