summaryrefslogtreecommitdiff
path: root/pango/pango-utils.h
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-07-16 19:59:19 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-07-16 19:59:19 +0000
commitca5b24d14066ce35f5b92d117beee0e3605b2f4b (patch)
treedff2e3baad7fe6d7b31d0f9a13b5b84801aa12f5 /pango/pango-utils.h
parent33c98d1b53adc6708fc20ff2db11a71f93c23a13 (diff)
downloadpango-ca5b24d14066ce35f5b92d117beee0e3605b2f4b.tar.gz
pango/pango-utils.h pango/pango-utils.c pango/pangox-fontmap.c Move the
2000-07-16 Tor Lillqvist <tml@iki.fi> * pango/pango-utils.h * pango/pango-utils.c * pango/pangox-fontmap.c * pango/pangowin32-fontmap.c: Move the get_{style,variant, weight,stretch} functions to pango-utils.c, and rename them to pango_parse_*. Would otherwise be duplicated in pangox and angowin32. * pango/pango.def: Export them. * pango/pango-font.h: Add PANGO_WEIGHT_ULTRALIGHT, PANGO_WEIGHT_LIGHT, PANGO_WEIGHT_EXTRABOLD and PANGO_WEIGHT_HEAVY values to PangoWeight. * pango/pango-utils.c: Recognize the new weight strings. * pango/pangowin32.c (pango_win32_list_subfonts): Don't g_free the subfont_list from the subfonts_by_subrange hash table... * pango/pangowin32-fontmap.c (pango_win32_font_map_read_alias_file): Also set the other properties in the LOGFONT, not only the face name. (pango_win32_insert_font): Insert a pointer to a freshly allocated LOGFONT in the hash table, not the one passed in as a parameter, which could be (and in fact, *is*) a pointer to an auto variable. Quantize the description weight values to exact PANGO_WEIGHT_* values. (pango_win32_get_unknown_glyph): Use subfont 1. * examples/viewer-win32.c: (split_paragraphs): Don't include the newline. (draw): Correct 1st parameter to gdk_win32_hdc_{get,release}.
Diffstat (limited to 'pango/pango-utils.h')
-rw-r--r--pango/pango-utils.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/pango/pango-utils.h b/pango/pango-utils.h
index 1c8dfcaa..941ad515 100644
--- a/pango/pango-utils.h
+++ b/pango/pango-utils.h
@@ -38,6 +38,20 @@ gboolean pango_scan_int (const char **pos,
char * pango_config_key_get (const char *key);
+/* Functions for parsing textual representations
+ * of PangoFontDescription fields. They return TRUE if the input string
+ * contains a valid value, which then has been assigned to the corresponding
+ * field in the PangoFontDescription.
+ */
+gboolean pango_parse_style (GString *str,
+ PangoFontDescription *desc);
+gboolean pango_parse_variant (GString *str,
+ PangoFontDescription *desc);
+gboolean pango_parse_weight (GString *str,
+ PangoFontDescription *desc);
+gboolean pango_parse_stretch (GString *str,
+ PangoFontDescription *desc);
+
/* On Unix, return the name of the "pango" subdirectory of SYSCONFDIR
* (which is set at compile time). On Win32, return the Pango
* installation directory (which is set at installation time, and
@@ -51,3 +65,4 @@ char * pango_get_sysconf_subdirectory (void);
* g_free'd either.
*/
char * pango_get_lib_subdirectory (void);
+