changeset 101979:1c96a8f3d1d7

(check_face_name): Check for fake helv. (Bug#2275) (add_font_entity_to_list): Call check_face_name even when family is unspecified.
author Jason Rumney <jasonr@gnu.org>
date Thu, 12 Feb 2009 14:59:22 +0000
parents 9a4825a9e483
children 6a4ebf650260
files src/w32font.c
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32font.c	Thu Feb 12 14:39:17 2009 +0000
+++ b/src/w32font.c	Thu Feb 12 14:59:22 2009 +0000
@@ -1374,6 +1374,14 @@
       _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 @@
 		   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.  */