diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-05-30 18:49:02 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-05-30 18:49:02 +0000 |
commit | b988bf518feb66916cbd137d62deca149b8cdcef (patch) | |
tree | 2a397a3b6c3ed0dc1928b17ff686aa32a4b25961 /examples/viewer.c | |
parent | f5692a3d420b3430deaf20ac6be3953966c4c479 (diff) | |
download | pango-b988bf518feb66916cbd137d62deca149b8cdcef.tar.gz |
Use g_strtod().
Tue May 30 14:30:24 2000 Owen Taylor <otaylor@redhat.com>
* pango/fonts.c (pango_font_description_from_string): Use g_strtod().
* pango/fonts.c (pango_font_description_to_string): Fix bug
where spaces where not properly inserted into font description
string.
* pango/fonts.c (pango_font_get_glyph_extents): Fix some
1000 <=> PANGO_SCALE bugs.
* pango/pangox-fontcache.c (pango_x_font_cache_load): Fix list
manipulation bug.
Diffstat (limited to 'examples/viewer.c')
-rw-r--r-- | examples/viewer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/viewer.c b/examples/viewer.c index 1fb93ef8..84b7b25d 100644 --- a/examples/viewer.c +++ b/examples/viewer.c @@ -426,7 +426,7 @@ set_style (GtkWidget *entry, gpointer data) void font_size_changed (GtkAdjustment *adj) { - font_description.size = (int)(adj->value * 1000 + 0.5); + font_description.size = (int)(adj->value * PANGO_SCALE + 0.5); reload_font(); } @@ -520,6 +520,12 @@ make_styles_combo () return combo; } +static int +cmp_strings (const void *a, const void *b) +{ + return strcmp (*(const char **)a, *(const char **)b); +} + GtkWidget * make_families_menu () { |