Verified Commit 1ad1521e authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃 Committed by ma1
Browse files

BB 43322: Customize the font visibility lists.

Customize the lists of fonts to assign base visibility to in
base browser and derivatives.

Also, rename the files with the upstream lists, to make sure we do not
use them by mistake.
parent 91ab2fdd
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

static const char* kBaseFonts[] = {
    "Apple Color Emoji",
    "AppleGothic",
    "Arial",
    "Arial Black",
    "Arial Narrow",
    "Courier",
    "Courier New",
    "Geneva",
    "Georgia",
    "Heiti TC",
    "Helvetica",
    "Helvetica Neue",
    "Hiragino Kaku Gothic ProN",
    "Kailasa",
    "Lucida Grande",
    "Menlo",
    "Monaco",
    "PingFang HK",
    "PingFang SC",
    "PingFang TC",
    "Songti SC",
    "Songti TC",
    "Tahoma",
    "Thonburi",
    "Times",
    "Times New Roman",
    "Verdana",
};
+90 −0
Original line number Diff line number Diff line
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

static const char* kBaseFonts[] = {
    "Arial",
    "Cambria Math",
    "Consolas",
    "Courier New",
    "Georgia",
    "Lucida Console",
    "Malgun Gothic",
    "Microsoft Himalaya",
    "Microsoft JhengHei",
    "Microsoft YaHei",
    "MS Gothic",
    "MS PGothic",
    "MV Boli",
    "Segoe UI",
    "SimSun",
    "Sylfaen",
    "Tahoma",
    "Times New Roman",
    "Verdana",
};

struct FontSubstitute {
  const char* substituteName;
  const char* actualFontName;
};

static const FontSubstitute kFontSubstitutes[] = {
    // Common substitutions
    {"Arabic Transparent", "Arial"},
    {"Arabic Transparent Bold", "Arial Bold"},
    {"Arial Baltic", "Arial"},
    {"Arial CE", "Arial"},
    {"Arial CYR", "Arial"},
    {"Arial Greek", "Arial"},
    {"Arial TUR", "Arial"},
    {"Courier New Baltic", "Courier New"},
    {"Courier New CE", "Courier New"},
    {"Courier New CYR", "Courier New"},
    {"Courier New Greek", "Courier New"},
    {"Courier New TUR", "Courier New"},
    {"Helv", "MS Sans Serif"},
    {"Helvetica", "Arial"},
    {"MS Shell Dlg 2", "Tahoma"},
    {"Tahoma Armenian", "Tahoma"},
    {"Times", "Times New Roman"},
    {"Times New Roman Baltic", "Times New Roman"},
    {"Times New Roman CE", "Times New Roman"},
    {"Times New Roman CYR", "Times New Roman"},
    {"Times New Roman Greek", "Times New Roman"},
    {"Times New Roman TUR", "Times New Roman"},
    {"Tms Rmn", "MS Serif"},
    // Common, except Japanese (which uses MS UI Gothic, instead)
    {"MS Shell Dlg", "Microsoft Sans Serif"},
    // Arabic
    {"Arial (Arabic)", "Arial"},
    {"Courier New (Arabic)", "Courier New"},
    {"Times New Roman (Arabic)", "Times New Roman"},
    // Cyrillic + Greek
    {"Courier", "Courier New"},
    // Greek
    {"Fixedsys Greek", "Fixedsys"},
    {"MS Serif Greek", "MS Serif"},
    {"MS Sans Serif Greek", "MS Sans Serif"},
    {"Small Fonts Greek", "Small Fonts"},
    {"System Greek", "System"},
    // Hebrew
    {"Arial (Hebrew)", "Arial"},
    {"Courier New (Hebrew)", "Courier New"},
    {"David Transparent", "David"},
    {"Fixed Miriam Transparent", "Miriam Fixed"},
    {"Miriam Transparent", "Miriam"},
    {"Rod Transparent", "Rod"},
    {"Times New Roman (Hebrew)", "Times New Roman"},
    // Japanese
    {"標準明朝", "MS 明朝"},
    {"標準ゴシック", "MS ゴシック"},
    {"ゴシック", "MS ゴシック"},
    {"ゴシック", "MS ゴシック"},
    {"クーリエ", "Courier"},
    {"タイムズロマン", "Times New Roman"},
    {"ヘルベチカ", "Arial"},
    // Simplified Chinese
    {"FangSong_GB2312", "FangSong"},
    {"KaiTi_GB2312", "KaiTi"},
};
+0 −65
Original line number Diff line number Diff line
@@ -200,68 +200,3 @@ static const char* kLangPackFonts[] = {
//  "Rockwell Nova",  // Pan-European Supplemental Fonts - EXCLUDED
//  "Verdana Pro",  // Pan-European Supplemental Fonts - EXCLUDED
};

struct FontSubstitute {
  const char *substituteName;
  const char *actualFontName;
};

static const FontSubstitute kFontSubstitutes[] = {
  // Common substitutions
  {"Arabic Transparent", "Arial"},
  {"Arabic Transparent Bold", "Arial Bold"},
  {"Arial Baltic", "Arial"},
  {"Arial CE", "Arial"},
  {"Arial CYR", "Arial"},
  {"Arial Greek", "Arial"},
  {"Arial TUR", "Arial"},
  {"Courier New Baltic", "Courier New"},
  {"Courier New CE", "Courier New"},
  {"Courier New CYR", "Courier New"},
  {"Courier New Greek", "Courier New"},
  {"Courier New TUR", "Courier New"},
  {"Helv", "MS Sans Serif"},
  {"Helvetica", "Arial"},
  {"MS Shell Dlg 2", "Tahoma"},
  {"Tahoma Armenian", "Tahoma"},
  {"Times", "Times New Roman"},
  {"Times New Roman Baltic", "Times New Roman"},
  {"Times New Roman CE", "Times New Roman"},
  {"Times New Roman CYR", "Times New Roman"},
  {"Times New Roman Greek", "Times New Roman"},
  {"Times New Roman TUR", "Times New Roman"},
  {"Tms Rmn", "MS Serif"},
  // Common, except Japanese (which uses MS UI Gothic, instead)
  {"MS Shell Dlg", "Microsoft Sans Serif"},
  // Arabic
  {"Arial (Arabic)", "Arial"},
  {"Courier New (Arabic)", "Courier New"},
  {"Times New Roman (Arabic)", "Times New Roman"},
  // Cyrillic + Greek
  {"Courier", "Courier New"},
  // Greek
  {"Fixedsys Greek", "Fixedsys"},
  {"MS Serif Greek", "MS Serif"},
  {"MS Sans Serif Greek", "MS Sans Serif"},
  {"Small Fonts Greek", "Small Fonts"},
  {"System Greek", "System"},
  // Hebrew
  {"Arial (Hebrew)", "Arial"},
  {"Courier New (Hebrew)", "Courier New"},
  {"David Transparent", "David"},
  {"Fixed Miriam Transparent", "Miriam Fixed"},
  {"Miriam Transparent", "Miriam"},
  {"Rod Transparent", "Rod"},
  {"Times New Roman (Hebrew)", "Times New Roman"},
  // Japanese
  {"標準明朝", "MS 明朝"},
  {"標準ゴシック", "MS ゴシック"},
  {"ゴシック", "MS ゴシック"},
  {"ゴシック", "MS ゴシック"},
  {"クーリエ", "Courier"},
  {"タイムズロマン", "Times New Roman"},
  {"ヘルベチカ", "Arial"},
  // Simplified Chinese
  {"FangSong_GB2312", "FangSong"},
  {"KaiTi_GB2312", "KaiTi"},
};
Loading