Bug 384362 – pango can't select some font styles
authorBehdad Esfahbod <behdad@gnome.org>
Sun, 4 Jan 2009 02:25:59 +0000 (02:25 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Sun, 4 Jan 2009 02:25:59 +0000 (02:25 +0000)
2009-01-03  Behdad Esfahbod  <behdad@gnome.org>

        Bug 384362 – pango can't select some font styles

        * pango/pango-font.h:
        Add enum values PANGO_WEIGHT_THIN and PANGO_WEIGHT_MEDIUM to
        PangoWeight.

        * pango/fonts.c: Parse "Thin", "Extra-Light", "Regular", "Demi-Bold",
        "Extra-Bold", and "Black" as weight descriptors (from the OpenType
        spec).

svn path=/trunk/; revision=2782

ChangeLog
pango/fonts.c
pango/pango-font.h

index a275b4f..1591a1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2009-01-03  Behdad Esfahbod  <behdad@gnome.org>
 
+       Bug 384362 – pango can't select some font styles
+
+       * pango/pango-font.h:
+       Add enum values PANGO_WEIGHT_THIN and PANGO_WEIGHT_MEDIUM to
+       PangoWeight.
+
+       * pango/fonts.c: Parse "Thin", "Extra-Light", "Regular", "Demi-Bold",
+       "Extra-Bold", and "Black" as weight descriptors (from the OpenType
+       spec).
+
+2009-01-03  Behdad Esfahbod  <behdad@gnome.org>
+
        Bug 168085 – numeric styles in pango_font_description_to_string()
 
        * pango/fonts.c (parse_int), (find_field), (find_field_any),
index e1a10a5..4af87e8 100644 (file)
@@ -858,14 +858,20 @@ static const FieldMap variant_map[] = {
 };
 
 static const FieldMap weight_map[] = {
+  { PANGO_WEIGHT_THIN, "Thin" },
   { PANGO_WEIGHT_ULTRALIGHT, "Ultra-Light" },
+  { PANGO_WEIGHT_ULTRALIGHT, "Extra-Light" },
   { PANGO_WEIGHT_LIGHT, "Light" },
   { PANGO_WEIGHT_NORMAL, "" },
-  { 500, "Medium" },
+  { PANGO_WEIGHT_NORMAL, "Regular" },
+  { PANGO_WEIGHT_MEDIUM, "Medium" },
   { PANGO_WEIGHT_SEMIBOLD, "Semi-Bold" },
+  { PANGO_WEIGHT_SEMIBOLD, "Demi-Bold" },
   { PANGO_WEIGHT_BOLD, "Bold" },
   { PANGO_WEIGHT_ULTRABOLD, "Ultra-Bold" },
-  { PANGO_WEIGHT_HEAVY, "Heavy" }
+  { PANGO_WEIGHT_ULTRABOLD, "Extra-Bold" },
+  { PANGO_WEIGHT_HEAVY, "Heavy" },
+  { PANGO_WEIGHT_HEAVY, "Black" }
 };
 
 static const FieldMap stretch_map[] = {
index 66e68aa..5a86113 100644 (file)
@@ -52,9 +52,11 @@ typedef enum {
 } PangoVariant;
 
 typedef enum {
+  PANGO_WEIGHT_THIN = 100,
   PANGO_WEIGHT_ULTRALIGHT = 200,
   PANGO_WEIGHT_LIGHT = 300,
   PANGO_WEIGHT_NORMAL = 400,
+  PANGO_WEIGHT_MEDIUM = 500,
   PANGO_WEIGHT_SEMIBOLD = 600,
   PANGO_WEIGHT_BOLD = 700,
   PANGO_WEIGHT_ULTRABOLD = 800,