StandardFonts-win10.inc (11826B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 #ifdef StandardFonts 6 7 # ifndef BASE_BROWSER_VERSION 8 9 // List of standard font families installed as part of Windows 10 10 // from https://docs.microsoft.com/en-us/typography/fonts/windows_10_font_list 11 // TODO: check whether we need to list legacy styled family names like "... 12 // Light". 13 [[maybe_unused]] static const char* kBaseFonts[] = { 14 "Arial", 15 "Arial Black", 16 "Bahnschrift", 17 "Bahnschrift Light", 18 "Bahnschrift SemiBold", 19 "Bahnschrift SemiLight", 20 "Calibri", 21 "Calibri Light", 22 "Cambria", 23 "Cambria Math", 24 "Candara", 25 "Comic Sans MS", 26 "Consolas", 27 "Constantia", 28 "Corbel", 29 "Courier New", 30 "Ebrima", 31 "Franklin Gothic Medium", 32 "Gabriola", 33 "Gadugi", 34 "Georgia", 35 "Impact", 36 "Javanese Text", 37 "Leelawadee UI", 38 "Leelawadee UI Semilight", 39 "Lucida Console", 40 "Lucida Sans Unicode", 41 "Malgun Gothic", 42 "Malgun Gothic Semilight", 43 "Marlett", 44 "Microsoft Himalaya", 45 "Microsoft JhengHei", 46 "Microsoft JhengHei Light", 47 "Microsoft JhengHei UI", 48 "Microsoft JhengHei UI Light", 49 "Microsoft New Tai Lue", 50 "Microsoft PhagsPa", 51 "Microsoft Sans Serif", 52 "Microsoft Tai Le", 53 "Microsoft YaHei", 54 "Microsoft YaHei Light", 55 "Microsoft YaHei UI", 56 "Microsoft YaHei UI Light", 57 "Microsoft Yi Baiti", 58 "MingLiU-ExtB", 59 "MingLiU_HKSCS-ExtB", 60 "Mongolian Baiti", 61 "MS Gothic", 62 "MS PGothic", 63 "MS UI Gothic", 64 "MV Boli", 65 "Myanmar Text", 66 "Nirmala Text", 67 "Nirmala UI", 68 "Nirmala UI Semilight", 69 "NSimSun", 70 "Palatino Linotype", 71 "PMingLiU-ExtB", 72 "Segoe MDL2 Assets", 73 "Segoe Print", 74 "Segoe Script", 75 "Segoe UI", 76 "Segoe UI Black", 77 "Segoe UI Emoji", 78 "Segoe UI Historic", 79 "Segoe UI Light", 80 "Segoe UI Semibold", 81 "Segoe UI Semilight", 82 "Segoe UI Symbol", 83 "SimSun", 84 "SimSun-ExtB", 85 "SimSun-ExtG", 86 "Sitka Banner", 87 "Sitka Display", 88 "Sitka Heading", 89 "Sitka Small", 90 "Sitka Subheading", 91 "Sitka Text", 92 "Sylfaen", 93 "Symbol", 94 "Tahoma", 95 "Times New Roman", 96 "Trebuchet MS", 97 "Verdana", 98 "Webdings", 99 "Wingdings", 100 "Yu Gothic", 101 "Yu Gothic Light", 102 "Yu Gothic Medium", 103 "Yu Gothic UI", 104 "Yu Gothic UI Light", 105 "Yu Gothic UI Semibold", 106 "Yu Gothic UI Semilight", 107 }; 108 109 // Additional fonts provided by language-pack installation. 110 [[maybe_unused]] static const char* kLangPackFonts[] = { 111 "Aharoni", // Hebrew Supplemental Fonts 112 "Aldhabi", // Arabic Script Supplemental Fonts 113 "Andalus", // Arabic Script Supplemental Fonts 114 "Angsana New", // Thai Supplemental Fonts 115 "AngsanaUPC", // Thai Supplemental Fonts 116 "Aparajita", // Devanagari Supplemental Fonts 117 "BatangChe", // Korean Supplemental Fonts 118 "BIZ UDGothic", // Japanese Supplemental Fonts 119 "BIZ UDMincho", // Japanese Supplemental Fonts 120 "BIZ UDPGothic", // Japanese Supplemental Fonts 121 "BIZ UDPMincho", // Japanese Supplemental Fonts 122 "Browallia New", // Thai Supplemental Fonts 123 "BrowalliaUPC", // Thai Supplemental Fonts 124 "Cordia New", // Thai Supplemental Fonts 125 "CordiaUPC", // Thai Supplemental Fonts 126 "DaunPenh", // Khmer Supplemental Fonts 127 "David", // Hebrew Supplemental Fonts 128 "DengXian", // Chinese (Simplified) Supplemental Fonts 129 "DFKai-SB", // Chinese (Traditional) Supplemental Fonts 130 "DilleniaUPC", // Thai Supplemental Fonts 131 "DokChampa", // Lao Supplemental Fonts 132 "Dotum", // Korean Supplemental Fonts 133 "DotumChe", // Korean Supplemental Fonts 134 "Estrangelo Edessa", // Syriac Supplemental Fonts 135 "EucrosiaUPC", // Thai Supplemental Fonts 136 "Euphemia", // Canadian Aboriginal Syllabics Supplemental Fonts 137 "FangSong", // Chinese (Simplified) Supplemental Fonts 138 "FrankRuehl", // Hebrew Supplemental Fonts 139 "FreesiaUPC", // Thai Supplemental Fonts 140 "Gautami", // Telugu Supplemental Fonts 141 "Gisha", // Hebrew Supplemental Fonts 142 "Gulim", // Korean Supplemental Fonts 143 "GulimChe", // Korean Supplemental Fonts 144 "Gungsuh", // Korean Supplemental Fonts 145 "GungsuhChe", // Korean Supplemental Fonts 146 "IrisUPC", // Thai Supplemental Fonts 147 "Iskoola Pota", // Sinhala Supplemental Fonts 148 "JasmineUPC", // Thai Supplemental Fonts 149 "KaiTi", // Chinese (Simplified) Supplemental Fonts 150 "Kalinga", // Odia Supplemental Fonts 151 "Kartika", // Malayalam Supplemental Fonts 152 "Khmer UI", // Khmer Supplemental Fonts 153 "KodchiangUPC", // Thai Supplemental Fonts 154 "Kokila", // Devanagari Supplemental Fonts 155 "Lao UI", // Lao Supplemental Fonts 156 "Latha", // Tamil Supplemental Fonts 157 "LilyUPC", // Thai Supplemental Fonts 158 "Mangal", // Devanagari Supplemental Fonts 159 "Meiryo", // Japanese Supplemental Fonts 160 "MingLiU", // Chinese (Traditional) Supplemental Fonts 161 "MingLiU_HKSCS", // Chinese (Traditional) Supplemental Fonts 162 "Miriam", // Hebrew Supplemental Fonts 163 "Miriam Fixed", // Hebrew Supplemental Fonts 164 "MoolBoran", // Khmer Supplemental Fonts 165 "MS PMincho", // Japanese Supplemental Fonts 166 "Narkisim", // Hebrew Supplemental Fonts 167 "Noto Sans HK", // Chinese (Traditional, Hong Kong) Supplemental Fonts 168 "Noto Sans JP", // Japanese Supplemental Fonts 169 "Noto Sans KR", // Korean Supplemental Fonts 170 "Noto Sans SC", // Chinese (Simplified) Supplemental Fonts 171 "Noto Sans TC", // Chinese (Traditional) Supplemental Fonts 172 "Noto Serif HK", // Chinese (Traditional, Hong Kong) Supplemental Fonts 173 "Noto Serif JP", // Japanese Supplemental Fonts 174 "Noto Serif KR", // Korean Supplemental Fonts 175 "Noto Serif SC", // Chinese (Simplified) Supplemental Fonts 176 "Noto Serif TC", // Chinese (Traditional) Supplemental Fonts 177 "Nyala", // Ethiopic Supplemental Fonts 178 "Plantagenet Cherokee", // Cherokee Supplemental Fonts 179 "Raavi", // Gurmukhi Supplemental Fonts 180 "Rod", // Hebrew Supplemental Fonts 181 "Sakkal Majalla", // Arabic Script Supplemental Fonts 182 "Sanskrit Text", // Devanagari Supplemental Fonts 183 "Shonar Bangla", // Bangla Script Supplemental Fonts 184 "Shruti", // Gujarati Supplemental Fonts 185 "Simplified Arabic", // Arabic Script Supplemental Fonts 186 "Traditional Arabic", // Arabic Script Supplemental Fonts 187 "Tunga", // Kannada Supplemental Fonts 188 "UD Digi Kyokasho N", // Japanese Supplemental Fonts (since 24H2) 189 "UD Digi Kyokasho N-B", // Japanese Supplemental Fonts (until 23H2) 190 "UD Digi Kyokasho N-R", // Japanese Supplemental Fonts (until 23H2) 191 "UD Digi Kyokasho NK", // Japanese Supplemental Fonts (since 24H2) 192 "UD Digi Kyokasho NK-B", // Japanese Supplemental Fonts (until 23H2) 193 "UD Digi Kyokasho NK-R", // Japanese Supplemental Fonts (until 23H2) 194 "UD Digi Kyokasho NP", // Japanese Supplemental Fonts (since 24H2) 195 "UD Digi Kyokasho NP-B", // Japanese Supplemental Fonts (until 23H2) 196 "UD Digi Kyokasho NP-R", // Japanese Supplemental Fonts (until 23H2) 197 "Urdu Typesetting", // Arabic Script Supplemental Fonts 198 "Utsaah", // Devanagari Supplemental Fonts 199 "Vani", // Telugu Supplemental Fonts 200 "Vijaya", // Tamil Supplemental Fonts 201 "Vrinda", // Bangla Script Supplemental Fonts 202 "Yu Mincho", // Japanese Supplemental Fonts 203 // Latin/Greek/Cyrillic scripts are already well-supported by the base 204 // fonts, so we do not include these even when the LangPack collection is 205 // enabled. 206 // "Arial Nova", // Pan-European Supplemental Fonts - EXCLUDED 207 // "Georgia Pro", // Pan-European Supplemental Fonts - EXCLUDED 208 // "Gill Sans Nova", // Pan-European Supplemental Fonts - EXCLUDED 209 // "Neue Haas Grotesk Text Pro", // Pan-European Supplemental Fonts - 210 // EXCLUDED "Rockwell Nova", // Pan-European Supplemental Fonts - EXCLUDED 211 // "Verdana Pro", // Pan-European Supplemental Fonts - EXCLUDED 212 }; 213 # endif 214 215 struct FontSubstitute { 216 const char* substituteName; 217 const char* actualFontName; 218 }; 219 220 static const FontSubstitute kFontSubstitutes[] = { 221 // Common substitutions 222 {"Arabic Transparent", "Arial"}, 223 {"Arial Baltic", "Arial"}, 224 {"Arial CE", "Arial"}, 225 {"Arial CYR", "Arial"}, 226 {"Arial Greek", "Arial"}, 227 {"Arial TUR", "Arial"}, 228 {"Courier New Baltic", "Courier New"}, 229 {"Courier New CE", "Courier New"}, 230 {"Courier New CYR", "Courier New"}, 231 {"Courier New Greek", "Courier New"}, 232 {"Courier New TUR", "Courier New"}, 233 {"Helv", "Microsoft Sans Serif"}, 234 {"Helvetica", "Arial"}, 235 {"MS Shell Dlg 2", "Tahoma"}, 236 {"Tahoma Armenian", "Tahoma"}, 237 {"Times", "Times New Roman"}, 238 {"Times New Roman Baltic", "Times New Roman"}, 239 {"Times New Roman CE", "Times New Roman"}, 240 {"Times New Roman CYR", "Times New Roman"}, 241 {"Times New Roman Greek", "Times New Roman"}, 242 {"Times New Roman TUR", "Times New Roman"}, 243 {"Tms Rmn", "Times New Roman"}, 244 // Common, except Japanese (which uses MS UI Gothic, instead) 245 {"MS Shell Dlg", "Microsoft Sans Serif"}, 246 // Arabic 247 {"Arial (Arabic)", "Arial"}, 248 {"Courier New (Arabic)", "Courier New"}, 249 {"Times New Roman (Arabic)", "Times New Roman"}, 250 // Cyrillic + Greek 251 {"Courier", "Courier New"}, 252 // Greek 253 {"Fixedsys Greek", "Fixedsys"}, 254 {"MS Serif Greek", "Times New Roman"}, 255 {"MS Sans Serif Greek", "Microsoft Sans Serif"}, 256 {"Small Fonts Greek", "Arial"}, 257 {"System Greek", "System"}, 258 // Hebrew 259 {"Arial (Hebrew)", "Arial"}, 260 {"Courier New (Hebrew)", "Courier New"}, 261 {"David Transparent", "David"}, 262 {"Fixed Miriam Transparent", "Miriam Fixed"}, 263 {"Miriam Transparent", "Miriam"}, 264 {"Rod Transparent", "Rod"}, 265 {"Times New Roman (Hebrew)", "Times New Roman"}, 266 // Japanese 267 {"標準明朝", "MS 明朝"}, 268 {"標準ゴシック", "MS ゴシック"}, 269 {"ゴシック", "MS ゴシック"}, 270 {"ゴシック", "MS ゴシック"}, 271 {"クーリエ", "Courier New"}, 272 {"タイムズロマン", "Times New Roman"}, 273 {"ヘルベチカ", "Arial"}, 274 // Simplified Chinese 275 {"FangSong_GB2312", "FangSong"}, 276 {"KaiTi_GB2312", "KaiTi"}, 277 }; 278 279 #endif 280 281 #ifdef FontInclusionByLocaleRules 282 283 FONT_RULE("arabic typesetting", {"ar", MatchSetting::StartsWith}, 284 {"fa", MatchSetting::StartsWith}) 285 FONT_RULE("batang", {"ko", MatchSetting::StartsWith}) 286 FONT_RULE("leelawadee", {"th", MatchSetting::StartsWith}) 287 FONT_RULE("levenim mt", {"he", MatchSetting::StartsWith}, 288 {"en-il", MatchSetting::Exact}) 289 FONT_RULE("meiryo ui", {"ja", MatchSetting::StartsWith}) 290 FONT_RULE("microsoft uighur", {"ar", MatchSetting::StartsWith}, 291 {"fa", MatchSetting::StartsWith}) 292 FONT_RULE("ms mincho", {"ja", MatchSetting::StartsWith}) 293 FONT_RULE("pmingliu", {"zh-hant", MatchSetting::StartsWith}) 294 FONT_RULE("simhei", {"zh-hans", MatchSetting::StartsWith}) 295 296 #endif