summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2008-10-08 16:04:46 +0000
committerWerner Lemberg <wl@gnu.org>2008-10-08 16:04:46 +0000
commitfa9d39940ec25836f05206adbb4eb54f23899408 (patch)
tree9f9671984951001c230d3a96d90f48c9b5bedd7c
parent54dd7cf43b8b8b5a6a8dbe98ece04c3e8ee4f693 (diff)
downloadfreetype2-fa9d39940ec25836f05206adbb4eb54f23899408.tar.gz
Fix Savannah bug #24485.
* src/type1/t1load.c (parse_charstrings): Assure that we always have a .notdef glyph.
-rw-r--r--ChangeLog7
-rw-r--r--src/type1/t1load.c14
2 files changed, 12 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ecc19255..c01a93e38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-09-22 John Tytgat <John.Tytgat@esko.com>
+
+ Fix Savannah bug #24485.
+
+ * src/type1/t1load.c (parse_charstrings): Assure that we always have
+ a .notdef glyph.
+
2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* src/base/ftmac.c: Include FT_TRUETYPE_TAGS_H for multi build.
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 36aa5de63..284b7d765 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1626,15 +1626,11 @@
}
}
- if ( loader->num_glyphs )
- return;
- else
- loader->num_glyphs = n;
+ loader->num_glyphs = n;
/* if /.notdef is found but does not occupy index 0, do our magic. */
- if ( ft_strcmp( (const char*)".notdef",
- (const char*)name_table->elements[0] ) &&
- notdef_found )
+ if ( notdef_found &&
+ ft_strcmp( ".notdef", (const char*)name_table->elements[0] ) )
{
/* Swap glyph in index 0 with /.notdef glyph. First, add index 0 */
/* name and code entries to swap_table. Then place notdef_index */
@@ -1703,7 +1699,7 @@
/* and add our own /.notdef glyph to index 0. */
/* 0 333 hsbw endchar */
- FT_Byte notdef_glyph[] = {0x8B, 0xF7, 0xE1, 0x0D, 0x0E};
+ FT_Byte notdef_glyph[] = { 0x8B, 0xF7, 0xE1, 0x0D, 0x0E };
char* notdef_name = (char *)".notdef";
@@ -1741,7 +1737,7 @@
goto Fail;
/* we added a glyph. */
- loader->num_glyphs = n + 1;
+ loader->num_glyphs += 1;
}
return;