Mercurial > emacs
comparison src/w32font.c @ 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 | a36cf7879fb6 |
children | 387b4a4bbc9b |
comparison
equal
deleted
inserted
replaced
101978:9a4825a9e483 | 101979:1c96a8f3d1d7 |
---|---|
1372 strncpy (full_iname, full_name, LF_FULLFACESIZE); | 1372 strncpy (full_iname, full_name, LF_FULLFACESIZE); |
1373 full_iname[LF_FULLFACESIZE] = 0; | 1373 full_iname[LF_FULLFACESIZE] = 0; |
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. */ |
1380 else if (!xstrcasecmp (font->lfFaceName, "times")) | 1388 else if (!xstrcasecmp (font->lfFaceName, "times")) |
1381 return xstrcasecmp (full_name, "times") == 0; | 1389 return xstrcasecmp (full_name, "times") == 0; |
1435 if ((logical_font->elfLogFont.lfOutPrecision == OUT_STRING_PRECIS | 1443 if ((logical_font->elfLogFont.lfOutPrecision == OUT_STRING_PRECIS |
1436 && !strstr (logical_font->elfFullName, | 1444 && !strstr (logical_font->elfFullName, |
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. */ |
1446 entity = w32_enumfont_pattern_entity (match_data->frame, logical_font, | 1453 entity = w32_enumfont_pattern_entity (match_data->frame, logical_font, |
1447 physical_font, font_type, | 1454 physical_font, font_type, |