freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Re: [Bug-gs] how to recognize GSF?


From: David Turner
Subject: Re: [Devel] Re: [Bug-gs] how to recognize GSF?
Date: Fri, 01 Feb 2002 10:22:41 +0100

Hello Ray,

Ray Johnston a écrit :
> 
> Werner,
> 
> Werner LEMBERG wrote:
> > > The .gsf extension on font files is not indicative of any particular
> > > format, but rather just indicates that this font is distributed with
> > > Ghostscript. The /FontType key determines whether the font is Type 1
> > > or Type 3. All are valid PostScript font formats that conform to the
> > > relevant Adobe specification. We were *NOT* trying to create a new
> > > font format.
> >
> > And what about the Hershey fonts, e.g. hritrb.gsf?  This is valid PS
> > code but not a valid Type 1 font.
> 
> The FontType key in the Hershey fonts is /FontType 3, thus these are
> vlaid Type 3 fonts.
> 
> > To ask differently: Are all GSF fonts accepted by ATM?
> 
> Don't ask us, ask Adobe. The question is can ATM accept valid Type 3
> fonts.
> 
> ATM is generally a HACK, and tends to be proprietary to Windows and
> Mac and not at all well supported. They (Adobe) don't even document
> exactly what they do or how they hook font substitution into the
> platform.
>

The question isn't really about ATM, it's to know wether a GSF/Type3 font
can be handled appropriately by a font engine that is not also a Postscript
interpreter (with all the complexity that this requires)..

I had a quick look at the .gsf fonts on my machine (those that come with
Ghostscript 7.0):

  - some of them only contain pure Postscript fragments
    (e.g. "hrplf.gsf") that seem to be "re-used" by other
    ones

  - some of them only contain Postscript fragments
    (e.g. "hrplrb.gsf") that use others to (apparently) build a Type 3
    font.

  - some of them look like a Type 1 font (e.g. "fcyr.gsf"), except that
    they encode the content of each dictionary entry in hexadecimal ASCII
    instead of binary..

    However, according to version 1.1 of the Type 1 specification, the
    content of the /Subs and /CharStrings arrays should use
    "binary only charstring encryption" (see page 9, in section 2.2
    titled "Font Dictionary")

    so these fonts ARE NOT VALID TYPE 1 ACCORDING TO THE SPEC.

    This doesn't mean that we couldn't change FreeType to support them,
    though, or that a Postscript interpreter couldn't support them natively
    too..

  - note that some of these fonts use "%!PS-AdobeFont-1.0" (u003043t.gsf),
    while others use "%!FontType1-1.0" (fcyr.gsf), so it's not like we
    could use this to detect a GSF font..


Now, I'd like to know what scheme to use to detect at runtime wether a font
is a valid Type 1 or a Ghostscript "extension", without using the font file
name..

I'll try to study this.. It's seems that the T1-like GSF fonts do not use
"eexec" encryption at all, so that probably should be enough to "detect"
them.. However, this would mean quite a few changes to the Type 1 driver
so I'm not putting this on our priority list for now..


Finally, it seems that Type 3 fonts simply cannot be supported without
a Postscript interpreter. This means that FreeType will never support
these directly..


I hope that this clarifies the problems a bit..

Regards,

- David Turner



reply via email to

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