patchThe FreeType Project - Patches: patch #4944, Type1 parsing (procedures,...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #4944: Type1 parsing (procedures, comments, OtherSubrs)

Submitter:  None
Submitted:  Thu 02 Mar 2006 03:09:14 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  wl Originator Email:  -email is unavailable-
Open/Closed:  Closed

Thu 02 Mar 2006 04:14:22 PM UTC, comment #1: 

your patch looks great!

since we are in the process of releasing 2.2, so we can't
apply your patch right now

on freetype-devel I've also discussed some problems with the
Type 1 parser regarding Jenson and Kepler, so I'm really happy
that you are going to address this.

http://lists.gnu.org/archive/html/freetype-devel/2005-08/msg00022.html

hopefully, the mailing list works reliably soon again so that
we can discuss this on a broader forum

Werner LEMBERG <wl>
Group administrator
Thu 02 Mar 2006 03:09:14 PM UTC, original submission:  

Hi everybody,

on Feb 28 I tried to send this to
freetype-devel@nongnu.org, but it doesn't show up
at http://lists.gnu.org/archive/html/freetype-devel/,
and since lists.gnu.org currently has problems,
I try again here.


I've encountered some problems with Freetype's Type 1
parser and prepared a patch to address some of the
problems. The patch is against 2.2.0-RC3 and
unfortunately quite large.


1) Top-level procedures are now skipped by the parser,
   e.g., /foo { /FontName (X) def } def has no effect;
   this is an admittedly contrived example, not so
   contrived is Freetype's crash on Adobe Jenson
   because it pokes around in the font's shareddict.

2) The Type 1 decoder now stores the operands on
   the stack as 16.16 values. This is necessary
because
   a charstring can have sequences like
   9 2 div hlineto. Also OtherSubr no 28 ("rand") can
   push a real number between 0 and 1 onto the stack.

   However, the extra precision is currently thrown
   when building the outline (see
1_builder_add_point()
   in src/psaux/psobjs.c). Furthermore, an FT_Fixed
   might be to small to store all values that can
   be specified in a charstring.

3) Preliminary support for multiple master fonts like
   Adobe Jenson. This has two additional keywords
   (/NDV and /CDV) in its Private dict whose values
   are indices of subroutines. These are Type 2
   charstrings which are used as the
   NormalizeDesignVector and ConvertDesignVector
   routines.

   Fonts can also has a /BuildCharArray in their
   Private dict which is an array and used as a
   scratch space to hold temporary during charstring
   execution.

   For complete support it would be necessary to pull
   in the Type 2 machinery into the Type 1 decoder,
   which I haven't managed yet.

4) Added support for OtherSubrs 19 -- 25, 27, and 28,
   used by some multiple master fonts. Also a more
   generic implementation for handling unknown
   OtherSubrs.

5) The pop(s) to a callothersubr can now be part of
   a subroutine
   (e.g., 555 1 3 callothersubr 666 callsubr is OK
   if subr 666 starts with pop); needed for
   Monotype Garamond Swash and others.


Still open:

A) There are still instances where characters are not
   skipped although they are part of a string,
comment,
   or procedure.

B) Multiple Master support is still broken.

C) If a glyph of Type 1 or Type 2 font uses random
   numbers, its rendered bitmap must not be cached.
   This must also be communicated to the application
   so that it does not cache the bitmap on its own.

D) Finish support for non-integral coordinates in
   Type 1 (and Type 2) charstrings.

Regards,
Jens

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #9641:  t1parse_and_othersubrs.diff added by None (39KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 7 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-11-07 wl Open/ClosedOpen Closed
2006-11-07 wl StatusNone Done
2006-03-02 wl Carbon-Copy- Added freetype
2006-03-02 wl Carbon-Copy- Added olvaffe
2006-03-02 wl Assigned toNone wl
2006-03-02 None Attached File- Added t1parse_and_othersubrs.diff, #6004
    Carbon-Copy- Added jens --PUNKT-- claudius --AT-- yahoo --PUNKT-- com

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code