summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-05-22 19:03:26 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-05-22 19:03:26 +0000
commitf9697a634b7267fa0743e47561c28b3ca3ae226b (patch)
treedaed2b3bb55faaf5ae8a0f18584c5fe81c055f7b
parent707be23961a01d36e592f86d0471fa43114e1b36 (diff)
downloadpango-f9697a634b7267fa0743e47561c28b3ca3ae226b.tar.gz
Bug 339730 – Pango needlessly falls back away from a Type 1 font into a
2006-05-22 Behdad Esfahbod <behdad@gnome.org> Bug 339730 – Pango needlessly falls back away from a Type 1 font into a TTF font * pango/fonts.c (find_field): Fix strncmp usage.
-rw-r--r--ChangeLog7
-rw-r--r--pango/fonts.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ffbce8f..94fcec35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2006-05-22 Behdad Esfahbod <behdad@gnome.org>
+ Bug 339730 – Pango needlessly falls back away from a Type 1 font into
+ a TTF font
+
+ * pango/fonts.c (find_field): Fix strncmp usage.
+
+2006-05-22 Behdad Esfahbod <behdad@gnome.org>
+
Bug 342562 – Support absolute sizes in
pango_font_description_to/from_string
diff --git a/pango/fonts.c b/pango/fonts.c
index 17f67703..38f459ef 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -802,7 +802,8 @@ find_field (const FieldMap *map, int n_elements, const char *str, int len, int *
for (i=0; i<n_elements; i++)
{
- if (map[i].str && g_ascii_strncasecmp (map[i].str, str, len) == 0)
+ if (map[i].str[0] && g_ascii_strncasecmp (map[i].str, str, len) == 0 &&
+ map[i].str[len] == '\0')
{
if (val)
*val = map[i].value;