From 80fb60e0c5e19de379941f85a4f361455459d818 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 25 Sep 2001 16:40:45 +0000 Subject: Version 0.20 Tue Sep 25 11:54:03 2001 Owen Taylor * configure.in: Version 0.20 * NEWS: Updated * configure.in (GLIB_REQUIRED_VERSION): Require GLib 1.3.9 * examples/Makefile.am (EXTRA_DIST): Add the viewer-qt in case someone (say Tim) makes dist without qt installed. (reported by Tony Graham) * examples/Makefile.am (pango.modules): Don't use grep -q (reported by Tony Graham) * docs/pango-sections.txt: Fix small typo. --- pango/fonts.c | 43 ++++++++++++++----------------------------- pango/pangoft2-fontmap.c | 4 ++-- pango/pangowin32-fontmap.c | 2 +- pango/pangox-fontmap.c | 2 +- 4 files changed, 18 insertions(+), 33 deletions(-) (limited to 'pango') diff --git a/pango/fonts.c b/pango/fonts.c index 10cdad36..b32fab37 100644 --- a/pango/fonts.c +++ b/pango/fonts.c @@ -161,7 +161,7 @@ pango_font_description_set_family_static (PangoFontDescription *desc, * Gets the family name field of a font description. See * pango_font_description_set_family(). * - * Return value: The family name field, or %NULL if the family name is unset. + * Return value: The family name field. (Will be %NULL if not previously set.) **/ G_CONST_RETURN char * pango_font_description_get_family (const PangoFontDescription *desc) @@ -202,9 +202,8 @@ pango_font_description_set_style (PangoFontDescription *desc, * Gets the style field of a #PangoFontDescription. See * pango_font_description_set_style(). * - * Return value: the style field for the font description. Returns - * %PANGO_STYLE_NORMAL if the style field is unset. Use - * pango_font_description_get_set_fields() to find out if + * Return value: the style field for the font description. + * Use pango_font_description_get_set_fields() to find out if * the field was explicitely set or not. **/ PangoStyle @@ -240,8 +239,7 @@ pango_font_description_set_variant (PangoFontDescription *desc, * Gets the variant field of a #PangoFontDescription. See * pango_font_description_set_variant(). * - * Return value: the variant field for the font description. Returns - * %PANGO_VARIANT_NORMAL if the variant field is unset. Use + * Return value: the variant field for the font description. Use * pango_font_description_get_set_fields() to find out if * the field was explicitely set or not. **/ @@ -280,8 +278,7 @@ pango_font_description_set_weight (PangoFontDescription *desc, * Gets the weight field of a font description. See * pango_font_description_set_weight(). * - * Return value: the weight field for the font description. Returns - * %PANGO_WEIGHT_NORMAL if the weight field is unset. Use + * Return value: the weight field for the font description. Use * pango_font_description_get_set_fields() to find out if * the field was explicitely set or not. **/ @@ -318,8 +315,7 @@ pango_font_description_set_stretch (PangoFontDescription *desc, * Gets the stretch field of a font description. * See pango_font_description_set_stretch(). * - * Return value: the stretch field for the font description. Returns - * %PANGO_STRETCH_NORMAL if the stretch field is unset. Use + * Return value: the stretch field for the font description. Use * pango_font_description_get_set_fields() to find out if * the field was explicitely set or not. **/ @@ -357,8 +353,8 @@ pango_font_description_set_size (PangoFontDescription *desc, * See pango_font_description_get_size(). * * Return value: the size field for the font description in pango - * units. (PANGO_SCALE pango units equals one point.) Returns 0 if - * the stretch field is unset. Use + * units. (PANGO_SCALE pango units equals one point). Returns 0 if + * the stretch field has not previously been set. * pango_font_description_get_set_fields() to find out if the field * was explicitely set or not. **/ @@ -392,7 +388,12 @@ pango_font_description_get_set_fields (const PangoFontDescription *desc) * @desc: a #PangoFontDescription * @to_unset: bitmask of fields in the @desc to unset. * - * Unsets some of the fields in a #PangoFontDescription. + * Unsets some of the fields in a #PangoFontDescription. Note that + * this merely marks the fields cleared, it does not clear the + * settings for those fields, to clear a family name set with + * pango_font_description_set_family_static() so that it won't + * be returned by subsequent calls to pango_font_description_get_family(), + * you must actually call pango_font_description-set_family (desc, NULL); **/ void pango_font_description_unset_fields (PangoFontDescription *desc, @@ -400,22 +401,6 @@ pango_font_description_unset_fields (PangoFontDescription *desc, { g_return_if_fail (desc != NULL); - /* We reset cleared mask values back to defaults, to avoid - * having to check the mask for getters. - */ - if (to_unset & PANGO_FONT_MASK_FAMILY) - pango_font_description_set_family (desc, NULL); - if (to_unset & PANGO_FONT_MASK_STYLE) - desc->style = PANGO_STYLE_NORMAL; - if (to_unset & PANGO_FONT_MASK_VARIANT) - desc->variant = PANGO_VARIANT_NORMAL; - if (to_unset & PANGO_FONT_MASK_WEIGHT) - desc->weight = PANGO_WEIGHT_NORMAL; - if (to_unset & PANGO_FONT_MASK_STRETCH) - desc->stretch = PANGO_STRETCH_NORMAL; - if (to_unset & PANGO_FONT_MASK_SIZE) - desc->size = 0; - desc->mask &= ~to_unset; } diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c index 8b0cf67c..e2aa3bca 100644 --- a/pango/pangoft2-fontmap.c +++ b/pango/pangoft2-fontmap.c @@ -420,7 +420,7 @@ pango_ft2_font_map_load_font (PangoFontMap *fontmap, g_return_val_if_fail (description != NULL, NULL); - name = g_ascii_strdown (pango_font_description_get_family (description)); + name = g_ascii_strdown (pango_font_description_get_family (description), -1); family_entry = g_hash_table_lookup (ft2fontmap->families, name); g_free (name); @@ -753,7 +753,7 @@ pango_ft2_insert_face (PangoFT2FontMap *ft2fontmap, PangoFT2OA *oa; FT_Open_Args *open_args; - family_name = g_ascii_strdown (face->family_name); + family_name = g_ascii_strdown (face->family_name, -1); if (face->style_flags & FT_STYLE_FLAG_ITALIC) style = PANGO_STYLE_ITALIC; diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c index bcaa2275..3d4f48a9 100644 --- a/pango/pangowin32-fontmap.c +++ b/pango/pangowin32-fontmap.c @@ -429,7 +429,7 @@ pango_win32_font_map_load_font (PangoFontMap *fontmap, g_return_val_if_fail (description != NULL, NULL); - name = g_ascii_strdown (pango_font_description_get_family (description)); + name = g_ascii_strdown (pango_font_description_get_family (description), -1); win32family = g_hash_table_lookup (win32fontmap->families, name); if (win32family) diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c index c84ec0fb..4deebe66 100644 --- a/pango/pangox-fontmap.c +++ b/pango/pangox-fontmap.c @@ -398,7 +398,7 @@ pango_x_font_map_load_font (PangoFontMap *fontmap, g_return_val_if_fail (description != NULL, NULL); - name = g_ascii_strdown (pango_font_description_get_family (description)); + name = g_ascii_strdown (pango_font_description_get_family (description), -1); size = pango_font_description_get_size (description); if (size <= 0) -- cgit v1.2.1