aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2009-01-09 18:32:21 +0000
committerJason Rumney2009-01-09 18:32:21 +0000
commit4624b6e34c382721eb71d34881d28aba537faa91 (patch)
tree2785bb452ed71c65f6af72b98a73fc304956195f /src
parente227e0c8ead409b7a0ede81ea2bf15cf2f14f434 (diff)
downloademacs-4624b6e34c382721eb71d34881d28aba537faa91.tar.gz
emacs-4624b6e34c382721eb71d34881d28aba537faa91.zip
(add_font_entity_to_list): Don't report unknown
Windows charset as any unrecognized registry. (Bug#1548) Only report Unicode Plane 2 fonts as unicode-sip.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/w32font.c14
2 files changed, 12 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 362cf9c51cd..0cd7e35fb6b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12009-01-09 Jason Rumney <jasonr@gnu.org>
2
3 * w32font.c (add_font_entity_to_list): Don't report unknown
4 Windows charset as any unrecognized registry. (Bug#1548)
5 Only report Unicode Plane 2 fonts as unicode-sip.
6
12009-01-09 Chong Yidong <cyd@stupidchicken.com> 72009-01-09 Chong Yidong <cyd@stupidchicken.com>
2 8
3 * xfaces.c (Fx_font_family_list): Function deleted. Compatibility 9 * xfaces.c (Fx_font_family_list): Function deleted. Compatibility
diff --git a/src/w32font.c b/src/w32font.c
index caea03b856d..922a377f826 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -1439,19 +1439,17 @@ add_font_entity_to_list (logical_font, physical_font, font_type, lParam)
1439 /* unicode-sip fonts must contain characters beyond the BMP, 1439 /* unicode-sip fonts must contain characters beyond the BMP,
1440 so look for bit 57 (surrogates) in the Unicode subranges. */ 1440 so look for bit 57 (surrogates) in the Unicode subranges. */
1441 else if (EQ (spec_charset, Qunicode_sip) 1441 else if (EQ (spec_charset, Qunicode_sip)
1442 && !(physical_font->ntmFontSig.fsUsb[1] & 0x02000000)) 1442 && (!(physical_font->ntmFontSig.fsUsb[1] & 0x02000000)
1443 || !(physical_font->ntmFontSig.fsUsb[1] & 0x28000000)))
1443 return 1; 1444 return 1;
1444 /* If registry was specified, but did not map to a windows 1445 /* If registry was specified, but did not map to a windows
1445 charset, only report fonts that have unknown charsets. 1446 charset, don't report any fonts. */
1446 This will still report fonts that don't match, but at
1447 least it eliminates known definite mismatches. */
1448 else if (!NILP (spec_charset) 1447 else if (!NILP (spec_charset)
1449 && !EQ (spec_charset, Qiso10646_1) 1448 && !EQ (spec_charset, Qiso10646_1)
1450 && !EQ (spec_charset, Qunicode_bmp) 1449 && !EQ (spec_charset, Qunicode_bmp)
1451 && !EQ (spec_charset, Qunicode_sip) 1450 && !EQ (spec_charset, Qunicode_sip)
1452 && match_data->pattern.lfCharSet == DEFAULT_CHARSET 1451 && match_data->pattern.lfCharSet == DEFAULT_CHARSET)
1453 && logical_font->elfLogFont.lfCharSet != DEFAULT_CHARSET) 1452 return 0;
1454 return 1;
1455 1453
1456 /* If registry was specified, ensure it is reported as the same. */ 1454 /* If registry was specified, ensure it is reported as the same. */
1457 if (!NILP (spec_charset)) 1455 if (!NILP (spec_charset))
@@ -1488,7 +1486,7 @@ add_one_font_entity_to_list (logical_font, physical_font, font_type, lParam)
1488 add_font_entity_to_list (logical_font, physical_font, font_type, lParam); 1486 add_font_entity_to_list (logical_font, physical_font, font_type, lParam);
1489 1487
1490 /* If we have a font in the list, terminate the search. */ 1488 /* If we have a font in the list, terminate the search. */
1491 return !NILP (match_data->list); 1489 return NILP (match_data->list);
1492} 1490}
1493 1491
1494/* Old function to convert from x to w32 charset, from w32fns.c. */ 1492/* Old function to convert from x to w32 charset, from w32fns.c. */