summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-05-22 19:04:00 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-05-22 19:04:00 +0000
commit9636b0851f236742090c06660dc6e3b372208c63 (patch)
treec5d32f7e4332daf608ea99699eee64904cbdda8e
parentdc683af2e3834e7f615a1520dc1434085f63f89e (diff)
downloadpango-9636b0851f236742090c06660dc6e3b372208c63.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 82a73a76..3278f61d 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 341922 – pango should handle more characters as zero width
Patch from Roozbeh Pournader
diff --git a/pango/fonts.c b/pango/fonts.c
index e89335e7..87c1498c 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -800,7 +800,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;