summaryrefslogtreecommitdiff
path: root/src/type42
diff options
context:
space:
mode:
authorJohn Tytgat <John.Tytgat@esko.com>2009-09-01 08:10:24 +0200
committerWerner Lemberg <wl@gnu.org>2009-09-01 08:10:24 +0200
commit03e8b2f763ea0368e714345d98c534226915adc6 (patch)
treeaae0e8f3ff14661b50f7f27732d8bf9e33b0338c /src/type42
parent17904a107a6cb6e5ba7999e3b25f38919d7e86e5 (diff)
Fix custom cmap for empty Type 1 font (Savannah bug #27294).
* include/freetype/internal/t1types.h (T1_EncodingRecRec_): Update comment to reflect revised code_last meaning. * src/type1/t1load.c (T1_Open_Face), src/type42/t42objs.c (T42_Open_Face): Assign max_char as highest character code + 1 and use this for T1_EncodingRecRec_::code_last. * src/psaux/t1cmap.c (t1_cmap_custom_init): Follow revised T1_EncodingRecRec_::code_last meaning.
Diffstat (limited to 'src/type42')
-rw-r--r--src/type42/t42objs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index c0002ae3..9081ffc6 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -100,8 +100,8 @@
/* The index is then stored in type1.encoding.char_index, and */
/* the name in type1.encoding.char_name */
- min_char = +32000;
- max_char = -32000;
+ min_char = 0;
+ max_char = 0;
charcode = 0;
for ( ; charcode < loader.encoding_table.max_elems; charcode++ )
@@ -127,13 +127,14 @@
{
if ( charcode < min_char )
min_char = charcode;
- if ( charcode > max_char )
- max_char = charcode;
+ if ( charcode >= max_char )
+ max_char = charcode + 1;
}
break;
}
}
}
+
type1->encoding.code_first = min_char;
type1->encoding.code_last = max_char;
type1->encoding.num_chars = loader.num_chars;