[pango/pango2: 281/301] Capitalize generic names




commit 6be5f3d79bb8030e222e0c670cfb200b7d7ca224
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jun 19 08:27:02 2022 -0700

    Capitalize generic names
    
    It is what the font chooser expects.
    
    Also, make Sans an alternative to Sans-serif.

 pango/pangocoretext-fontmap.c | 15 ++++++++-------
 pango/pangodwrite-fontmap.cpp | 11 ++++++-----
 pango/pangofc-fontmap.c       | 16 ++++++++--------
 3 files changed, 22 insertions(+), 20 deletions(-)
---
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
index 3f8a87fdc..c0558c0b7 100644
--- a/pango/pangocoretext-fontmap.c
+++ b/pango/pangocoretext-fontmap.c
@@ -386,13 +386,14 @@ pango_core_text_font_map_populate (PangoFontMap *map)
     const char *alias_name;
     const char *family_name;
   } aliases[] = {
-    { "monospace",  "Courier" },
-    { "sans-serif", "Helvetica" },
-    { "serif",      "Times" },
-    { "cursive",    "Apple Chancery" },
-    { "fantasy",    "Papyrus", },
-    { "system-ui",  ".AppleSystemUIFont" },
-    { "emoji",      "Apple Color Emoji" }
+    { "Monospace",  "Courier" },
+    { "Sans-serif", "Helvetica" },
+    { "Sans", "Helvetica" },
+    { "Serif",      "Times" },
+    { "Cursive",    "Apple Chancery" },
+    { "Fantasy",    "Papyrus", },
+    { "System-ui",  ".AppleSystemUIFont" },
+    { "Emoji",      "Apple Color Emoji" }
   };
 
   for (int i = 0; i < G_N_ELEMENTS (aliases); i++)
diff --git a/pango/pangodwrite-fontmap.cpp b/pango/pangodwrite-fontmap.cpp
index c932c2de1..37307a3d2 100644
--- a/pango/pangodwrite-fontmap.cpp
+++ b/pango/pangodwrite-fontmap.cpp
@@ -301,11 +301,12 @@ pango_direct_write_font_map_populate (PangoFontMap *map)
     const char *alias_name;
     const char *family_name;
   } aliases[] = {
-    { "monospace",  "Consolas" },
-    { "sans-serif", "Arial" },
-    { "serif",      "Times New Roman" },
-    { "system-ui",  "Segoe UI" },
-    { "emoji",      "Segoe UI Emoji" }
+    { "Monospace",  "Consolas" },
+    { "Sans-serif", "Arial" },
+    { "Sans", "Arial" },
+    { "Serif",      "Times New Roman" },
+    { "System-ui",  "Segoe UI" },
+    { "Emoji",      "Segoe UI Emoji" }
   };
 
 #if 0
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 1bae2744b..6058ff68b 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -361,8 +361,8 @@ pango_fc_font_map_populate (PangoFontMap *map)
 
   /* Add aliases */
   const char *alias_names[] = {
-    "system-ui",
-    "emoji"
+    "System-ui",
+    "Emoji"
   };
 
   for (int i = 0; i < G_N_ELEMENTS (alias_names); i++)
@@ -405,12 +405,12 @@ pango_fc_font_map_populate (PangoFontMap *map)
    * has 'sans-serif'
    */
   const char *generic_names[] = {
-    "monospace",
-    "sans-serif",
-    "sans",
-    "serif",
-    "cursive",
-    "fantasy",
+    "Monospace",
+    "Sans-serif",
+    "Sans",
+    "Serif",
+    "Cursive",
+    "Fantasy",
   };
   FcLangSet *no_langs = FcLangSetCreate ();
   FcLangSet *emoji_langs = FcLangSetCreate ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]