diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-09-18 20:05:20 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-09-18 20:05:20 +0000 |
commit | a49e070d24242c0297e6325587c4bc135e13e26c (patch) | |
tree | 0510d066cc185e9d0b1b736736da5266d259878e /pango/pango-utils.c | |
parent | 39f3626e34e0522e0bdec591f6c0334307d39625 (diff) | |
download | pango-a49e070d24242c0297e6325587c4bc135e13e26c.tar.gz |
Up to 0.19.
Tue Sep 18 15:47:08 2001 Owen Taylor <otaylor@redhat.com>
* configure.in (PANGO_MINOR_VERSION): Up to 0.19.
* pango/pango-font.h pango/pango-fontmap.[ch] pango/fonts.c
pango/pangoxft-fontmap.c pango/pangoft-fontmap.c pango/pango-context.[ch]
pango/pangox-fontmap.c: Add new PangoFontFace and PangoFontFamily
object types, and change the font listing API to list faces and
families, instead of face names and font descriptions.
* pango/pango-font.h pango/fonts.c: Make PangoFontDescription
an opaque heap-allocated structure, add accessors and
convenience functions.
* pango/pango-font.h pango/pango-private.h: Make PangoFontMetrics
heap allocated, protect the structure definition with
#ifdef PANGO_ENABLE_BACKEND, and add getters for the fields.
* pango/pango-attributes.[ch] ( pango_attr_iterator_get_font):
instead of providing a base font description and one to fill
in, provide a single font description to modify based on
the attributes.
* pango/pango-attributes.[ch]: Fix PangoAttrFontDesc to have
a PangoFontDescription by reference, not by value.
* pango/pango-utils.[ch]: make pango_parse_style() and friends
take pointers to individual enumerations instead of to a
PangoFontDescription structure.
* pango/*.c: Fix for the PangoFontDescription and PangoFontMetrics
changes.
* pango/pango-{break,engine,indic,ot,xft}.h pango/Makefile.am
pango/opentype/Makefile.am: Protect portions with
PANGO_ENABLE_ENGINE to shrink the public API.
* modules/*/Makefile.am: -DPANGO_ENABLE_ENGINE.
* pango/{pangox.h,pangox-private.h} modules/basic/basic-x.c: Move
pango_x_font_get_unknown_glyph() into public header since it is
used from modules.
* pango/pango-{context,font,fontmap,modules.utils}.h pango/Makefile.am:
Protect portions with PANGO_ENABLE_BACKEND to shrink the public API.
* pango/*.h: Use G_BEGIN/END_DECLS
* examples/viewer-qt.[cc,h]: Fix for changes to font listing API,
PangoFontDescription.
* pango/pango-indic.h modules/indic/*: Since we install this
header fix it up to Pango conventions, namespece
ZERO_WIDTH_JOINER, ZERO_WIDTH_NON_JOINER.
* docs/pango-sections.txt: Updated.
Diffstat (limited to 'pango/pango-utils.c')
-rw-r--r-- | pango/pango-utils.c | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/pango/pango-utils.c b/pango/pango-utils.c index b27fe4a3..ecde5310 100644 --- a/pango/pango-utils.c +++ b/pango/pango-utils.c @@ -648,9 +648,9 @@ pango_get_lib_subdirectory (void) } gboolean -pango_parse_style (const char *str, - PangoFontDescription *desc, - gboolean warn) +pango_parse_style (const char *str, + PangoStyle *style, + gboolean warn) { if (*str == '\0') return FALSE; @@ -661,21 +661,21 @@ pango_parse_style (const char *str, case 'N': if (g_strcasecmp (str, "normal") == 0) { - desc->style = PANGO_STYLE_NORMAL; + *style = PANGO_STYLE_NORMAL; return TRUE; } break; case 'i': if (g_strcasecmp (str, "italic") == 0) { - desc->style = PANGO_STYLE_ITALIC; + *style = PANGO_STYLE_ITALIC; return TRUE; } break; case 'o': if (g_strcasecmp (str, "oblique") == 0) { - desc->style = PANGO_STYLE_OBLIQUE; + *style = PANGO_STYLE_OBLIQUE; return TRUE; } break; @@ -687,9 +687,9 @@ pango_parse_style (const char *str, } gboolean -pango_parse_variant (const char *str, - PangoFontDescription *desc, - gboolean warn) +pango_parse_variant (const char *str, + PangoVariant *variant, + gboolean warn) { if (*str == '\0') return FALSE; @@ -700,7 +700,7 @@ pango_parse_variant (const char *str, case 'N': if (g_strcasecmp (str, "normal") == 0) { - desc->variant = PANGO_VARIANT_NORMAL; + *variant = PANGO_VARIANT_NORMAL; return TRUE; } break; @@ -709,7 +709,7 @@ pango_parse_variant (const char *str, if (g_strcasecmp (str, "small_caps") == 0 || g_strcasecmp (str, "smallcaps") == 0) { - desc->variant = PANGO_VARIANT_SMALL_CAPS; + *variant = PANGO_VARIANT_SMALL_CAPS; return TRUE; } break; @@ -721,9 +721,9 @@ pango_parse_variant (const char *str, } gboolean -pango_parse_weight (const char *str, - PangoFontDescription *desc, - gboolean warn) +pango_parse_weight (const char *str, + PangoWeight *weight, + gboolean warn) { if (*str == '\0') return FALSE; @@ -734,7 +734,7 @@ pango_parse_weight (const char *str, case 'B': if (g_strcasecmp (str, "bold") == 0) { - desc->weight = PANGO_WEIGHT_BOLD; + *weight = PANGO_WEIGHT_BOLD; return TRUE; } break; @@ -742,7 +742,7 @@ pango_parse_weight (const char *str, case 'H': if (g_strcasecmp (str, "heavy") == 0) { - desc->weight = PANGO_WEIGHT_HEAVY; + *weight = PANGO_WEIGHT_HEAVY; return TRUE; } break; @@ -750,7 +750,7 @@ pango_parse_weight (const char *str, case 'L': if (g_strcasecmp (str, "light") == 0) { - desc->weight = PANGO_WEIGHT_LIGHT; + *weight = PANGO_WEIGHT_LIGHT; return TRUE; } break; @@ -758,7 +758,7 @@ pango_parse_weight (const char *str, case 'N': if (g_strcasecmp (str, "normal") == 0) { - desc->weight = PANGO_WEIGHT_NORMAL; + *weight = PANGO_WEIGHT_NORMAL; return TRUE; } break; @@ -766,12 +766,12 @@ pango_parse_weight (const char *str, case 'U': if (g_strcasecmp (str, "ultralight") == 0) { - desc->weight = PANGO_WEIGHT_ULTRALIGHT; + *weight = PANGO_WEIGHT_ULTRALIGHT; return TRUE; } else if (g_strcasecmp (str, "ultrabold") == 0) { - desc->weight = PANGO_WEIGHT_ULTRABOLD; + *weight = PANGO_WEIGHT_ULTRABOLD; return TRUE; } break; @@ -788,7 +788,7 @@ pango_parse_weight (const char *str, { char *end; - desc->weight = strtol (str, &end, 0); + *weight = strtol (str, &end, 0); if (*end != '\0') { if (warn) @@ -805,9 +805,9 @@ pango_parse_weight (const char *str, } gboolean -pango_parse_stretch (const char *str, - PangoFontDescription *desc, - gboolean warn) +pango_parse_stretch (const char *str, + PangoStretch *stretch, + gboolean warn) { if (*str == '\0') return FALSE; @@ -818,7 +818,7 @@ pango_parse_stretch (const char *str, case 'C': if (g_strcasecmp (str, "condensed") == 0) { - desc->stretch = PANGO_STRETCH_CONDENSED; + *stretch = PANGO_STRETCH_CONDENSED; return TRUE; } break; @@ -827,18 +827,18 @@ pango_parse_stretch (const char *str, if (g_strcasecmp (str, "extra_condensed") == 0 || g_strcasecmp (str, "extracondensed") == 0) { - desc->stretch = PANGO_STRETCH_EXTRA_CONDENSED; + *stretch = PANGO_STRETCH_EXTRA_CONDENSED; return TRUE; } if (g_strcasecmp (str, "extra_expanded") == 0 || g_strcasecmp (str, "extraexpanded") == 0) { - desc->stretch = PANGO_STRETCH_EXTRA_EXPANDED; + *stretch = PANGO_STRETCH_EXTRA_EXPANDED; return TRUE; } if (g_strcasecmp (str, "expanded") == 0) { - desc->stretch = PANGO_STRETCH_EXPANDED; + *stretch = PANGO_STRETCH_EXPANDED; return TRUE; } break; @@ -846,7 +846,7 @@ pango_parse_stretch (const char *str, case 'N': if (g_strcasecmp (str, "normal") == 0) { - desc->stretch = PANGO_STRETCH_NORMAL; + *stretch = PANGO_STRETCH_NORMAL; return TRUE; } break; @@ -855,13 +855,13 @@ pango_parse_stretch (const char *str, if (g_strcasecmp (str, "semi_condensed") == 0 || g_strcasecmp (str, "semicondensed") == 0) { - desc->stretch = PANGO_STRETCH_SEMI_CONDENSED; + *stretch = PANGO_STRETCH_SEMI_CONDENSED; return TRUE; } if (g_strcasecmp (str, "semi_expanded") == 0 || g_strcasecmp (str, "semiexpanded") == 0) { - desc->stretch = PANGO_STRETCH_SEMI_EXPANDED; + *stretch = PANGO_STRETCH_SEMI_EXPANDED; return TRUE; } break; @@ -870,13 +870,13 @@ pango_parse_stretch (const char *str, if (g_strcasecmp (str, "ultra_condensed") == 0 || g_strcasecmp (str, "ultracondensed") == 0) { - desc->stretch = PANGO_STRETCH_ULTRA_CONDENSED; + *stretch = PANGO_STRETCH_ULTRA_CONDENSED; return TRUE; } if (g_strcasecmp (str, "ultra_expanded") == 0 || g_strcasecmp (str, "ultraexpanded") == 0) { - desc->variant = PANGO_STRETCH_ULTRA_EXPANDED; + *stretch = PANGO_STRETCH_ULTRA_EXPANDED; return TRUE; } break; @@ -1016,6 +1016,8 @@ pango_language_from_string (const char *language) * in the list if the range is '*', the range is exactly the tag, * or the range is a prefix of the tag, and the character after the * tag is '-'. + * + * Returns: %TRUE if a match was found. **/ gboolean pango_language_matches (PangoLanguage *language, |