Commit b072c335 authored by Behdad Esfahbod's avatar Behdad Esfahbod Committed by Behdad Esfahbod

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
parent 24fb6a2b
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):
......
......@@ -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>
......
......@@ -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[] = {
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment