aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-03-12 19:34:45 +0200
committerEli Zaretskii2015-03-12 19:34:45 +0200
commitfc10058a4f8a68891bd7a3508d62f03bfa5bf7ce (patch)
tree3309b41cee0671c3bd7c2eeab7f28c0a86247a63 /src
parent2401274b239e837ec274b373ba0f2848faaea7b2 (diff)
downloademacs-fc10058a4f8a68891bd7a3508d62f03bfa5bf7ce.tar.gz
emacs-fc10058a4f8a68891bd7a3508d62f03bfa5bf7ce.zip
Fix support of scripts in w32font.c (Bug#19993)
src/w32font.c (font_supported_scripts): Add subranges for Latin Supplement, Latin Extended-A/B, Vai, Supplemental Punctuation, Tai Le, Buginese, Yijing Hexagrams, Ancient Greek Numbers, Tai Xuan Jing, Counting Rods, Sundanese, Lepcha, Ol Chiki, Saurashtra, Kayah Li, Rejang, Ancient Symbols, Phistos Disc, Carian, Lycian, Lydian, Dominoe Tiles, and Mahjong Tiles. Break the Mathematical Alphanumeric Symbols into several "scripts" like fontset.el does. (syms_of_w32font): DEFSYM all the new script symbols. lisp/international/fontset.el (script-representative-chars): Add a representative character for 'vai'.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/w32font.c102
2 files changed, 99 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fc776188f05..517052590c3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
12015-03-12 Eli Zaretskii <eliz@gnu.org>
2
3 * w32font.c (font_supported_scripts): Add subranges for Latin
4 Supplement, Latin Extended-A/B, Vai, Supplemental Punctuation, Tai
5 Le, Buginese, Yijing Hexagrams, Ancient Greek Numbers, Tai Xuan
6 Jing, Counting Rods, Sundanese, Lepcha, Ol Chiki, Saurashtra,
7 Kayah Li, Rejang, Ancient Symbols, Phistos Disc, Carian, Lycian,
8 Lydian, Dominoe Tiles, and Mahjong Tiles. Break the Mathematical
9 Alphanumeric Symbols into several "scripts" like fontset.el does.
10 (Bug#19993)
11 (syms_of_w32font): DEFSYM all the new script symbols.
12
12015-03-07 Eli Zaretskii <eliz@gnu.org> 132015-03-07 Eli Zaretskii <eliz@gnu.org>
2 14
3 * w32fns.c <ImmReleaseContext_Proc, ImmSetCompositionWindow_Proc>: 15 * w32fns.c <ImmReleaseContext_Proc, ImmSetCompositionWindow_Proc>:
diff --git a/src/w32font.c b/src/w32font.c
index 422f082e72b..77994593c6d 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -2127,9 +2127,18 @@ font_supported_scripts (FONTSIGNATURE * sig)
2127 supported = Fcons ((sym), supported) 2127 supported = Fcons ((sym), supported)
2128 2128
2129 SUBRANGE (0, Qlatin); 2129 SUBRANGE (0, Qlatin);
2130 /* The following count as latin too, ASCII should be present in these fonts,
2131 so don't need to mark them separately. */
2132 /* 1: Latin-1 supplement, 2: Latin Extended A, 3: Latin Extended B. */ 2130 /* 1: Latin-1 supplement, 2: Latin Extended A, 3: Latin Extended B. */
2131 /* Most fonts that support Latin will have good coverage of the
2132 Extended blocks, so in practice marking them below is not really
2133 needed, or useful: if a font claims support for, say, Latin
2134 Extended-B, but does not contain glyphs for some of the
2135 characters in the range, the user will have to augment her
2136 fontset to display those few characters. But we mark these
2137 subranges here anyway, for the marginal use cases where they
2138 might make a difference. */
2139 SUBRANGE (1, Qlatin);
2140 SUBRANGE (2, Qlatin);
2141 SUBRANGE (3, Qlatin);
2133 SUBRANGE (4, Qphonetic); 2142 SUBRANGE (4, Qphonetic);
2134 /* 5: Spacing and tone modifiers, 6: Combining Diacritical Marks. */ 2143 /* 5: Spacing and tone modifiers, 6: Combining Diacritical Marks. */
2135 SUBRANGE (7, Qgreek); 2144 SUBRANGE (7, Qgreek);
@@ -2137,7 +2146,12 @@ font_supported_scripts (FONTSIGNATURE * sig)
2137 SUBRANGE (9, Qcyrillic); 2146 SUBRANGE (9, Qcyrillic);
2138 SUBRANGE (10, Qarmenian); 2147 SUBRANGE (10, Qarmenian);
2139 SUBRANGE (11, Qhebrew); 2148 SUBRANGE (11, Qhebrew);
2140 /* 12: Vai. */ 2149 /* Bit 12 is rather useless if the user has Hebrew fonts installed,
2150 because apparently at some point in the past bit 12 was "Hebrew
2151 Extended", and many Hebrew fonts still have this bit set. The
2152 only workaround is to customize fontsets to use fonts like Ebrima
2153 or Quivira. */
2154 SUBRANGE (12, Qvai);
2141 SUBRANGE (13, Qarabic); 2155 SUBRANGE (13, Qarabic);
2142 SUBRANGE (14, Qnko); 2156 SUBRANGE (14, Qnko);
2143 SUBRANGE (15, Qdevanagari); 2157 SUBRANGE (15, Qdevanagari);
@@ -2153,8 +2167,11 @@ font_supported_scripts (FONTSIGNATURE * sig)
2153 SUBRANGE (25, Qlao); 2167 SUBRANGE (25, Qlao);
2154 SUBRANGE (26, Qgeorgian); 2168 SUBRANGE (26, Qgeorgian);
2155 SUBRANGE (27, Qbalinese); 2169 SUBRANGE (27, Qbalinese);
2156 /* 28: Hangul Jamo. */ 2170 /* 28: Hangul Jamo -- covered by the default fontset. */
2157 /* 29: Latin Extended, 30: Greek Extended, 31: Punctuation. */ 2171 /* 29: Latin Extended, 30: Greek Extended -- covered above. */
2172 /* 31: Supplemental Punctuation -- most probably be masked by
2173 Courier New, so fontset customization is needed. */
2174 SUBRANGE (31, Qsymbol);
2158 /* 32-47: Symbols (defined below). */ 2175 /* 32-47: Symbols (defined below). */
2159 SUBRANGE (48, Qcjk_misc); 2176 SUBRANGE (48, Qcjk_misc);
2160 /* Match either 49: katakana or 50: hiragana for kana. */ 2177 /* Match either 49: katakana or 50: hiragana for kana. */
@@ -2169,6 +2186,9 @@ font_supported_scripts (FONTSIGNATURE * sig)
2169 SUBRANGE (59, Qhan); /* There are others, but this is the main one. */ 2186 SUBRANGE (59, Qhan); /* There are others, but this is the main one. */
2170 SUBRANGE (59, Qideographic_description); /* Windows lumps this in. */ 2187 SUBRANGE (59, Qideographic_description); /* Windows lumps this in. */
2171 SUBRANGE (59, Qkanbun); /* And this. */ 2188 SUBRANGE (59, Qkanbun); /* And this. */
2189 /* These are covered well either by the default Courier New or by
2190 CJK fonts that are set up specially in the default fontset. So
2191 marking them here wouldn't be useful. */
2172 /* 60: Private use, 61: CJK strokes and compatibility. */ 2192 /* 60: Private use, 61: CJK strokes and compatibility. */
2173 /* 62: Alphabetic Presentation, 63: Arabic Presentation A. */ 2193 /* 62: Alphabetic Presentation, 63: Arabic Presentation A. */
2174 /* 64: Combining half marks, 65: Vertical and CJK compatibility. */ 2194 /* 64: Combining half marks, 65: Vertical and CJK compatibility. */
@@ -2197,31 +2217,54 @@ font_supported_scripts (FONTSIGNATURE * sig)
2197 SUBRANGE (87, Qdeseret); 2217 SUBRANGE (87, Qdeseret);
2198 SUBRANGE (88, Qbyzantine_musical_symbol); 2218 SUBRANGE (88, Qbyzantine_musical_symbol);
2199 SUBRANGE (88, Qmusical_symbol); /* Windows doesn't distinguish these. */ 2219 SUBRANGE (88, Qmusical_symbol); /* Windows doesn't distinguish these. */
2200 SUBRANGE (89, Qmathematical); 2220 SUBRANGE (89, Qmathematical_bold); /* See fontset.el:setup-default-fontset. */
2221 SUBRANGE (89, Qmathematical_italic);
2222 SUBRANGE (89, Qmathematical_bold_italic);
2223 SUBRANGE (89, Qmathematical_script);
2224 SUBRANGE (89, Qmathematical_bold_script);
2225 SUBRANGE (89, Qmathematical_fraktur);
2226 SUBRANGE (89, Qmathematical_double_struck);
2227 SUBRANGE (89, Qmathematical_bold_fraktur);
2228 SUBRANGE (89, Qmathematical_sans_serif);
2229 SUBRANGE (89, Qmathematical_sans_serif_bold);
2230 SUBRANGE (89, Qmathematical_sans_serif_italic);
2231 SUBRANGE (89, Qmathematical_sans_serif_bold_italic);
2232 SUBRANGE (89, Qmathematical_monospace);
2201 /* 90: Private use, 91: Variation selectors, 92: Tags. */ 2233 /* 90: Private use, 91: Variation selectors, 92: Tags. */
2202 SUBRANGE (93, Qlimbu); 2234 SUBRANGE (93, Qlimbu);
2203 SUBRANGE (94, Qtai_le); 2235 SUBRANGE (94, Qtai_le);
2204 /* 95: New Tai Le */ 2236 SUBRANGE (95, Qtai_le);
2205 SUBRANGE (90, Qbuginese); 2237 SUBRANGE (96, Qbuginese);
2206 SUBRANGE (97, Qglagolitic); 2238 SUBRANGE (97, Qglagolitic);
2207 SUBRANGE (98, Qtifinagh); 2239 SUBRANGE (98, Qtifinagh);
2208 /* 99: Yijing Hexagrams. */ 2240 /* 99: Yijing Hexagrams. */
2241 SUBRANGE (99, Qhan);
2209 SUBRANGE (100, Qsyloti_nagri); 2242 SUBRANGE (100, Qsyloti_nagri);
2210 SUBRANGE (101, Qlinear_b); 2243 SUBRANGE (101, Qlinear_b);
2211 /* 102: Ancient Greek Numbers. */ 2244 SUBRANGE (102, Qancient_greek_number);
2212 SUBRANGE (103, Qugaritic); 2245 SUBRANGE (103, Qugaritic);
2213 SUBRANGE (104, Qold_persian); 2246 SUBRANGE (104, Qold_persian);
2214 SUBRANGE (105, Qshavian); 2247 SUBRANGE (105, Qshavian);
2215 SUBRANGE (106, Qosmanya); 2248 SUBRANGE (106, Qosmanya);
2216 SUBRANGE (107, Qcypriot); 2249 SUBRANGE (107, Qcypriot);
2217 SUBRANGE (108, Qkharoshthi); 2250 SUBRANGE (108, Qkharoshthi);
2218 /* 109: Tai Xuan Jing. */ 2251 SUBRANGE (109, Qtai_xuan_jing_symbol);
2219 SUBRANGE (110, Qcuneiform); 2252 SUBRANGE (110, Qcuneiform);
2220 /* 111: Counting Rods, 112: Sundanese, 113: Lepcha, 114: Ol Chiki. */ 2253 SUBRANGE (111, Qcounting_rod_numeral);
2221 /* 115: Saurashtra, 116: Kayah Li, 117: Rejang. */ 2254 SUBRANGE (112, Qsundanese);
2255 SUBRANGE (113, Qlepcha);
2256 SUBRANGE (114, Qol_chiki);
2257 SUBRANGE (115, Qsaurashtra);
2258 SUBRANGE (116, Qkayah_li);
2259 SUBRANGE (117, Qrejang);
2222 SUBRANGE (118, Qcham); 2260 SUBRANGE (118, Qcham);
2223 /* 119: Ancient symbols, 120: Phaistos Disc. */ 2261 SUBRANGE (119, Qancient_symbol);
2224 /* 121: Carian, Lycian, Lydian, 122: Dominoes, Mahjong tiles. */ 2262 SUBRANGE (120, Qphaistos_disc);
2263 SUBRANGE (121, Qlycian);
2264 SUBRANGE (121, Qcarian);
2265 SUBRANGE (121, Qlydian);
2266 SUBRANGE (122, Qdomino_tile);
2267 SUBRANGE (122, Qmahjong_tile);
2225 /* 123-127: Reserved. */ 2268 /* 123-127: Reserved. */
2226 2269
2227 /* There isn't really a main symbol range, so include symbol if any 2270 /* There isn't really a main symbol range, so include symbol if any
@@ -2530,6 +2573,7 @@ syms_of_w32font (void)
2530 DEFSYM (Qcyrillic, "cyrillic"); 2573 DEFSYM (Qcyrillic, "cyrillic");
2531 DEFSYM (Qarmenian, "armenian"); 2574 DEFSYM (Qarmenian, "armenian");
2532 DEFSYM (Qhebrew, "hebrew"); 2575 DEFSYM (Qhebrew, "hebrew");
2576 DEFSYM (Qvai, "vai");
2533 DEFSYM (Qarabic, "arabic"); 2577 DEFSYM (Qarabic, "arabic");
2534 DEFSYM (Qsyriac, "syriac"); 2578 DEFSYM (Qsyriac, "syriac");
2535 DEFSYM (Qnko, "nko"); 2579 DEFSYM (Qnko, "nko");
@@ -2567,7 +2611,19 @@ syms_of_w32font (void)
2567 DEFSYM (Qyi, "yi"); 2611 DEFSYM (Qyi, "yi");
2568 DEFSYM (Qbyzantine_musical_symbol, "byzantine-musical-symbol"); 2612 DEFSYM (Qbyzantine_musical_symbol, "byzantine-musical-symbol");
2569 DEFSYM (Qmusical_symbol, "musical-symbol"); 2613 DEFSYM (Qmusical_symbol, "musical-symbol");
2570 DEFSYM (Qmathematical, "mathematical"); 2614 DEFSYM (Qmathematical_bold, "mathematical-bold");
2615 DEFSYM (Qmathematical_italic, "mathematical-italic");
2616 DEFSYM (Qmathematical_bold_italic, "mathematical-bold-italic");
2617 DEFSYM (Qmathematical_script, "mathematical-script");
2618 DEFSYM (Qmathematical_bold_script, "mathematical-bold-script");
2619 DEFSYM (Qmathematical_fraktur, "mathematical-fraktur");
2620 DEFSYM (Qmathematical_double_struck, "mathematical-double-struck");
2621 DEFSYM (Qmathematical_bold_fraktur, "mathematical-bold-fraktur");
2622 DEFSYM (Qmathematical_sans_serif, "mathematical-sans-serif");
2623 DEFSYM (Qmathematical_sans_serif_bold, "mathematical-sans-serif-bold");
2624 DEFSYM (Qmathematical_sans_serif_italic, "mathematical-sans-serif-italic");
2625 DEFSYM (Qmathematical_sans_serif_bold_italic, "mathematical-sans-serif-bold-italic");
2626 DEFSYM (Qmathematical_monospace, "mathematical-monospace");
2571 DEFSYM (Qcham, "cham"); 2627 DEFSYM (Qcham, "cham");
2572 DEFSYM (Qphonetic, "phonetic"); 2628 DEFSYM (Qphonetic, "phonetic");
2573 DEFSYM (Qbalinese, "balinese"); 2629 DEFSYM (Qbalinese, "balinese");
@@ -2594,6 +2650,22 @@ syms_of_w32font (void)
2594 DEFSYM (Qtai_le, "tai_le"); 2650 DEFSYM (Qtai_le, "tai_le");
2595 DEFSYM (Qtifinagh, "tifinagh"); 2651 DEFSYM (Qtifinagh, "tifinagh");
2596 DEFSYM (Qugaritic, "ugaritic"); 2652 DEFSYM (Qugaritic, "ugaritic");
2653 DEFSYM (Qlycian, "lycian");
2654 DEFSYM (Qcarian, "carian");
2655 DEFSYM (Qlydian, "lydian");
2656 DEFSYM (Qdomino_tile, "domino-tile");
2657 DEFSYM (Qmahjong_tile, "mahjong-tile");
2658 DEFSYM (Qtai_xuan_jing_symbol, "tai-xuan-jing-symbol");
2659 DEFSYM (Qcounting_rod_numeral, "counting-rod-numeral");
2660 DEFSYM (Qancient_symbol, "ancient-symbol");
2661 DEFSYM (Qphaistos_disc, "phaistos-disc");
2662 DEFSYM (Qancient_greek_number, "ancient-greek-number");
2663 DEFSYM (Qsundanese, "sundanese");
2664 DEFSYM (Qlepcha, "lepcha");
2665 DEFSYM (Qol_chiki, "ol-chiki");
2666 DEFSYM (Qsaurashtra, "saurashtra");
2667 DEFSYM (Qkayah_li, "kayah-li");
2668 DEFSYM (Qrejang, "rejang");
2597 2669
2598 /* W32 font encodings. */ 2670 /* W32 font encodings. */
2599 DEFVAR_LISP ("w32-charset-info-alist", 2671 DEFVAR_LISP ("w32-charset-info-alist",