summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2009-01-06 11:07:02 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2009-01-06 11:07:02 +0000
commitb072c3353cc2d10d6b26fb86cb13694a967a59cd (patch)
tree2844ce99d8207140eb53a69f24395ffaa0925d89
parent24fb6a2be0c492b023b32ab98556961a8317e13e (diff)
downloadpango-b072c3353cc2d10d6b26fb86cb13694a967a59cd.tar.gz
Bug 166709 – Handle font variants more consistently
2009-01-06 Behdad Esfahbod <behdad@gnome.org> Bug 166709 – Handle font variants more consistently * pango/pango-font.h: Add enum values PANGO_WEIGHT_BOOK and PANGO_WEIGHT_ULTRAHEAVY. * pango/fonts.c: * docs/tmpl/fonts.sgml: Add new weights with their aliases, as well as aliasing "Roman" to the normal weight. svn path=/trunk/; revision=2787
-rw-r--r--ChangeLog12
-rw-r--r--docs/tmpl/fonts.sgml8
-rw-r--r--pango/fonts.c8
-rw-r--r--pango/pango-font.h4
4 files changed, 28 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c66b02d8..978ab4a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2009-01-06 Behdad Esfahbod <behdad@gnome.org>
+ Bug 166709 – Handle font variants more consistently
+
+ * pango/pango-font.h:
+ Add enum values PANGO_WEIGHT_BOOK and PANGO_WEIGHT_ULTRAHEAVY.
+
+ * pango/fonts.c:
+ * docs/tmpl/fonts.sgml:
+ Add new weights with their aliases, as well as aliasing "Roman" to the
+ normal weight.
+
+2009-01-06 Behdad Esfahbod <behdad@gnome.org>
+
* pango/fonts.c (pango_font_description_to_filename):
Make it Unicode safe.
diff --git a/docs/tmpl/fonts.sgml b/docs/tmpl/fonts.sgml
index 4b91624b..baa05584 100644
--- a/docs/tmpl/fonts.sgml
+++ b/docs/tmpl/fonts.sgml
@@ -59,13 +59,17 @@ An enumeration specifying the weight (boldness) of a font. This is a numerical
value ranging from 100 to 900, but there are some predefined values:
</para>
+@PANGO_WEIGHT_THIN: the thin weight (= 100; Since: 1.24)
@PANGO_WEIGHT_ULTRALIGHT: the ultralight weight (= 200)
-@PANGO_WEIGHT_LIGHT: the light weight (=300)
+@PANGO_WEIGHT_LIGHT: the light weight (= 300)
+@PANGO_WEIGHT_BOOK: the book weight (= 380; Since: 1.24)
@PANGO_WEIGHT_NORMAL: the default weight (= 400)
-@PANGO_WEIGHT_SEMIBOLD: a weight intermediate between normal and bold (=600)
+@PANGO_WEIGHT_MEDIUM: the normal weight (= 500; Since: 1.24)
+@PANGO_WEIGHT_SEMIBOLD: the semibold weight (= 600)
@PANGO_WEIGHT_BOLD: the bold weight (= 700)
@PANGO_WEIGHT_ULTRABOLD: the ultrabold weight (= 800)
@PANGO_WEIGHT_HEAVY: the heavy weight (= 900)
+@PANGO_WEIGHT_ULTRAHEAVY: the ultraheavy weight (= 1000; Since: 1.24)
<!-- ##### MACRO PANGO_TYPE_WEIGHT ##### -->
<para>
diff --git a/pango/fonts.c b/pango/fonts.c
index 5e145aec..1faedff5 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -862,8 +862,10 @@ static const FieldMap weight_map[] = {
{ PANGO_WEIGHT_ULTRALIGHT, "Ultra-Light" },
{ PANGO_WEIGHT_ULTRALIGHT, "Extra-Light" },
{ PANGO_WEIGHT_LIGHT, "Light" },
+ { PANGO_WEIGHT_BOOK, "Book" },
{ PANGO_WEIGHT_NORMAL, "" },
{ PANGO_WEIGHT_NORMAL, "Regular" },
+ { PANGO_WEIGHT_NORMAL, "Roman" },
{ PANGO_WEIGHT_MEDIUM, "Medium" },
{ PANGO_WEIGHT_SEMIBOLD, "Semi-Bold" },
{ PANGO_WEIGHT_SEMIBOLD, "Demi-Bold" },
@@ -871,7 +873,11 @@ static const FieldMap weight_map[] = {
{ PANGO_WEIGHT_ULTRABOLD, "Ultra-Bold" },
{ PANGO_WEIGHT_ULTRABOLD, "Extra-Bold" },
{ PANGO_WEIGHT_HEAVY, "Heavy" },
- { PANGO_WEIGHT_HEAVY, "Black" }
+ { PANGO_WEIGHT_HEAVY, "Black" },
+ { PANGO_WEIGHT_ULTRAHEAVY, "Ultra-Heavy" },
+ { PANGO_WEIGHT_ULTRAHEAVY, "Extra-Heavy" },
+ { PANGO_WEIGHT_ULTRAHEAVY, "Ultra-Black" },
+ { PANGO_WEIGHT_ULTRAHEAVY, "Extra-Black" }
};
static const FieldMap stretch_map[] = {
diff --git a/pango/pango-font.h b/pango/pango-font.h
index 5a86113e..b5b2cf14 100644
--- a/pango/pango-font.h
+++ b/pango/pango-font.h
@@ -55,12 +55,14 @@ typedef enum {
PANGO_WEIGHT_THIN = 100,
PANGO_WEIGHT_ULTRALIGHT = 200,
PANGO_WEIGHT_LIGHT = 300,
+ PANGO_WEIGHT_BOOK = 380,
PANGO_WEIGHT_NORMAL = 400,
PANGO_WEIGHT_MEDIUM = 500,
PANGO_WEIGHT_SEMIBOLD = 600,
PANGO_WEIGHT_BOLD = 700,
PANGO_WEIGHT_ULTRABOLD = 800,
- PANGO_WEIGHT_HEAVY = 900
+ PANGO_WEIGHT_HEAVY = 900,
+ PANGO_WEIGHT_ULTRAHEAVY = 1000
} PangoWeight;
typedef enum {