[Top][All Lists]

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

Re: [ft] detecting font format from ft_face

From: Tor Andersson
Subject: Re: [ft] detecting font format from ft_face
Date: Sat, 29 Jul 2006 13:44:46 +0200

On 7/28/06, Werner LEMBERG <address@hidden> wrote:
> I am updating my MuPDF PDF viewer to use freetype 2.2 and I have hit
> a snag.  Because of the way PDF treats encodings, I need to know the
> format of a loaded font face.  [...]
> How do I achieve the same results without using the internal header
> files?

Try FT_Get_X11_Font_Format().

Can you give more details on what you need exactly?

Thanks, that's exactly what I need.

I have to differentiate between truetype, type1 and type1 cid font files.
This information is supposed to be in the PDF, but it's amazing
how often it is incorrect. It also doesn't work when the font is
not embedded, and the available system font is of another format
than the PDF file says.

By default I have to select a specific charmap. (7,x) for type1 fonts,
and (1,0) or (3,1) for truetypes. Then I need to find
named glyphs from the re-encoding in the PDF using a different
mechanism for the two formats.

CID fonts are another story altogether. To emulate CID fonts with
a truetype font I need to map CIDs to whatever encoding the
truetype font has.

It's all rather messy, but what do you expect from an Adobe format?


reply via email to

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