freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Re: Custom encodings with T1 fonts?


From: Tom Kacvinsky
Subject: [Devel] Re: Custom encodings with T1 fonts?
Date: Sun, 7 Jan 2001 20:45:45 -0500 (EST)

Hi Leaonard,

1.

I had thought of this custom encoding problem.  AFAIK, there is no API for
setting a custom encoding.  The best one can do right now is use the custom
encoding and a cmap to get the glyph indices...

2.

I have added charset and encoding table parsing to the Type 1C (CFF) driver.
Right now, if you can get the SID (string ID) of the glyph in the custom
encoding, then you can do a reverse lookup in the charset table to get the GID
(glyph id).

There are two areas were SIDs are stored -- in the names table of the CFF font,
and through the psnames module. What you will need to do is match the string
against one of the entries in the above tables, and the index at which the name
is stored is the string ID (or the string id is the index number + 391, in case
the string came out of the CFF fonts name table).  Once you have the string ID,
the lookup in the charset table to get the GID is easy.

With regards to 1 above, I have plans on adding cmaps for pure CFF fonts, but I
will be away on AMS business all next week.  What is your time line?

I hope this helps...

Tom


On Sun, 7 Jan 2001, Leonard Rosenthol wrote:

> I'm currently working with Derek Noonburg to replace Xpdf's
> (<http://www.foolabs.com/xpdf>) current use of FT1 and T1lib with
> FT2.   Replacing FT1 with FT2 for use on TrueType fonts was pretty
> easy and is working fine in an internal build, but Derek is having
> some problems with Type 1 and Type 1 C fonts.   Here is what he wrote
> me:
>
>
> At 3:46 PM -0800 1/7/01, Derek B. Noonburg wrote:
> >Using FreeType 2 for Type 1 and Type 1C fonts is going to be a problem.
> >For Type 1 fonts, FT2 sets up an "Adobe custom" cmap, which is supposed
> >to use whatever encoding is given in the font file, and which is exactly
> >what I want.  Except that some embedded Type 1 fonts have a completely
> >bogus encoding, which is ignored in favor of the encoding given in the
> >PDF Font dict.  T1lib lets me directly set an encoding, which is how I
> >got around it there.  Do you know if there's any way to do this with
> >FT2?  Also, Type 1C (CFF) fonts show 0 cmaps (face->num_charmaps after
> >calling FT_New_Face) - I haven't looked into this yet.
>
>
> So, does anyone have any thoughts for Derek?
>
>
> Leonard
>




reply via email to

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