aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2009-02-12 15:00:26 +0000
committerJason Rumney2009-02-12 15:00:26 +0000
commit631ea4fbf83f461ed1cc0ec40a5b3ad41b2aa810 (patch)
treefcb7508250242458e787c781212ec9d5006f09f7
parentcb4a3e4288f6f1e606fead5542f8be3973d5f0f9 (diff)
downloademacs-631ea4fbf83f461ed1cc0ec40a5b3ad41b2aa810.tar.gz
emacs-631ea4fbf83f461ed1cc0ec40a5b3ad41b2aa810.zip
(check_face_name): Check for fake helv. (Bug#2275)
(add_font_entity_to_list): Call check_face_name even when family is unspecified.
-rw-r--r--src/ChangeLog8
-rw-r--r--src/w32font.c13
2 files changed, 16 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5b6f0a6016a..dc38aa05bc7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,11 +1,15 @@
12009-02-12 Jason Rumney <jasonr@gnu.org> 12009-02-12 Jason Rumney <jasonr@gnu.org>
2 2
3 * w32font.c (check_face_name): Check for fake helv. (Bug#2275)
4 (add_font_entity_to_list): Call check_face_name even when family
5 is unspecified.
6
3 * w32term.c (x_display_pixel_height, x_display_pixel_width): 7 * w32term.c (x_display_pixel_height, x_display_pixel_width):
4 Release DC when finished. Use NULL window to refer to desktop. 8 Release DC when finished. Use NULL window to refer to desktop.
5 (w32_term_init): Use NULL window to refer to desktop. (Bug#460) 9 (w32_term_init): Use NULL window to refer to desktop. (Bug#460)
6 10
7 * w32font.c (add_font_entity_to_list): Fix check for substituted 11 * w32font.c (add_font_entity_to_list): Fix check for substituted
8 raster fonts. (Bug#2219) 12 raster fonts. (Bug#2219)
9 13
102009-02-12 Kenichi Handa <handa@m17n.org> 142009-02-12 Kenichi Handa <handa@m17n.org>
11 15
diff --git a/src/w32font.c b/src/w32font.c
index d28483ada1e..848da7f464d 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -1374,6 +1374,14 @@ check_face_name (font, full_name)
1374 _strlwr (full_iname); 1374 _strlwr (full_iname);
1375 return strstr ("helvetica", full_iname) != NULL; 1375 return strstr ("helvetica", full_iname) != NULL;
1376 } 1376 }
1377 /* Same for Helv. */
1378 if (!xstrcasecmp (font->lfFaceName, "helv"))
1379 {
1380 strncpy (full_iname, full_name, LF_FULLFACESIZE);
1381 full_iname[LF_FULLFACESIZE] = 0;
1382 _strlwr (full_iname);
1383 return strstr ("helv", full_iname) != NULL;
1384 }
1377 1385
1378 /* Since Times is mapped to Times New Roman, a substring 1386 /* Since Times is mapped to Times New Roman, a substring
1379 match is not sufficient to filter out the bogus match. */ 1387 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)
1437 logical_font->elfLogFont.lfFaceName)) 1445 logical_font->elfLogFont.lfFaceName))
1438 /* Check for well known substitutions that mess things up in the 1446 /* Check for well known substitutions that mess things up in the
1439 presence of Type-1 fonts of the same name. */ 1447 presence of Type-1 fonts of the same name. */
1440 || (match_data->pattern.lfFaceName[0] 1448 || (!check_face_name (&logical_font->elfLogFont,
1441 && !check_face_name (&logical_font->elfLogFont, 1449 logical_font->elfFullName)))
1442 logical_font->elfFullName)))
1443 return 1; 1450 return 1;
1444 1451
1445 /* Make a font entity for the font. */ 1452 /* Make a font entity for the font. */