[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] type 1 font with empty /Subrs []
From: |
Dirck Blaskey |
Subject: |
[Devel] type 1 font with empty /Subrs [] |
Date: |
Tue, 26 Nov 2002 10:35:53 -0800 |
Hi,
Here's a very tiny patch for Type 1 fonts.
I work on a PDF/Postscript interpreter product ( http://www.lib-sys.com )
that uses FreeType. Part of the package is a small set of the
standard Type 1 fonts licensed to be included in the product,
but FreeType has some minor problems loading them.
The initial problem, the /Subrs array in the Type 1 fonts is
present, but empty (using [] ) which makes the parser choke.
There was a second problem; FreeType Type 1 doesn't support
the Symbol encoding for the Symbol font. The fix for 2.0.9 is
straightforward, but the fix for the 2.1.x series isn't.
So far, I haven't pursued it further, since we're still using 2.0.9.
Here's the cvs diff for the first patch:
Index: t1load.c
===================================================================
RCS file: /cvs/freetype/freetype2/src/type1/t1load.c,v
retrieving revision 1.72
diff -u -r1.72 t1load.c
--- t1load.c 2002/09/17 12:39:19 1.72
+++ t1load.c 2002/11/23 07:24:00
@@ -1133,6 +1133,11 @@
/* with synthetic fonts, it's possible we get here twice */
return;
+ if ( parser->root.cursor[0]=='[' &&
+ parser->root.cursor[1]==']' )
+ /* empty array */
+ return;
+
loader->num_subrs = (FT_Int)T1_ToInt( parser );
if ( parser->root.error )
return;
- [Devel] type 1 font with empty /Subrs [],
Dirck Blaskey <=