summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2010-10-07 23:09:52 +1030
committerAdrian Johnson <ajohnson@redneon.com>2010-10-07 23:09:52 +1030
commitef60650bd6e0b3a354c85dc2e1be8550be6f7c91 (patch)
tree75c3f8c043d484e96014dc316742d35da4a4eaaa
parent390a6aa99771615763ed7349060e493f15c1d6d3 (diff)
Fix bug in subsetting check for winansi characters
-rw-r--r--src/cairo-scaled-font-subsets.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
index 5987a999b..7bc42f851 100644
--- a/src/cairo-scaled-font-subsets.c
+++ b/src/cairo-scaled-font-subsets.c
@@ -357,15 +357,13 @@ _cairo_unicode_to_winansi (unsigned long uni)
/* exclude the extra "hyphen" at 0xad to avoid duplicate glyphnames */
if ((uni >= 0x20 && uni <= 0x7e) ||
- (uni >= 0xa1 && uni <= 0xff && uni != 0xad))
+ (uni >= 0xa1 && uni <= 0xff && uni != 0xad) ||
+ uni == 0)
return uni;
- if (uni >= 0x80 && uni <= 0x9f) {
- for (i = 0; i < 32; i++) {
- if (_winansi_0x80_to_0x9f[i] == uni)
- return i + 0x80;
- }
- }
+ for (i = 0; i < 32; i++)
+ if (_winansi_0x80_to_0x9f[i] == uni)
+ return i + 0x80;
return -1;
}