freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: type1z, comments, etc... [was: failing fonts]


From: David Turner
Subject: Re: type1z, comments, etc... [was: failing fonts]
Date: Mon, 10 Jul 2000 12:41:52 +0200

Hi Tom,

> 
> If you have the default build of freetype2, then when opening up an
> instance of a MM font, the type1 module is used.  Looking at the
> source, comments are skipped in the type1 module.  However, there is
> some uncommented PS code in the instance that includes the token
> /BlendAxisTypes, which forces the type1 module to quit.  Then the
> type1z module is tried.
> 
Yes, the "type1" module isn't capable of handling multiple master
fonts (it would really be hard to modify it given its current
design and I don't want to really work on it anywore :-)

> It is the type1z module that barfs because (I am convinced of this
> now) the module can't load the /Blue... stuff in the Blend
> dictionary's Private dictionary -- the set up is such that the
> BlueScale, BlueFuzz, and BlueShift are all scalars, instead of arrays.
> In the problematic fonts, the Blend dictionary's Private dictionary has
> these as arrays.  Ooops!  Of course, these reside in PS comments, so
> why are they getting parsed?  Which leads to the other observation you
> made:
>

The "type1z" font driver uses a very simple pattern matching algorithm
to find tokens and record their values, but I don't think that I have
put code to specifically recognize and skip comments. That explains
why they're parsed. I hope to fix this by changing "parse_dict" soon..

By the way, I know the way "type1z" works is a bit surprising, but I
chose this method out of frustration after hacking the real Type 1
tokenizer that is in "type1" to make it work with a lot of "malformed"
font files. The string matcher works a lot better (by accepting some
fonts that are rejected by "type1") and is also a _lot_ faster..


> The type1z module does not skip comments.  Even if it did, we would
> still have problems because of the other cruft that is not commented
> out.  More or less, an instance ought not have any of the stuff that
> defines makeblendedfont, etc..., and remove the othersubrs and subrs
> related to MM interpolation.
> 

Yes, it basically means that the instance is not a valid Type 1 font
if this stuff is not in the comment.. However, there should be no
seg fault !!

Cheers,

- David

> Tom
> 
> On 9 Jul 2000, James H. Cloos Jr. wrote:
> 
> > >>>>> "Tom" == Tom Kacvinsky <address@hidden> writes:
> >
> > Tom> [mminstance] simply comments them out.  I haven't checked
> > Tom> carefully, but if those modules don't parse out the comments,
> > Tom> they might be fooled into thinking the instance is an MM font
> > Tom> (which it isn't anymore).
> >
> > Removing (but not just commenting out) those /Blue entries in /Private
> > and reassembling allows ftmulti to work.  Commenting them out does not,
> > so it looks like comments are not being ignored.
> >
> > (Tested to determine whether comments were being ignored, but mostly
> > just to see what the fonts looked like. :)
> >
> > Also, if you compare those fonts with Adobe(Sans|Serif)MM, the former
> > have arrays for more /Blue stuff than the latter.  May be relevant.
> > Or not.
> >
> > -JimC
> >



reply via email to

[Prev in Thread] Current Thread [Next in Thread]