freetype
[Top][All Lists]
Advanced

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

[ft] Handling an embedded CID font using Freetype


From: tony smith
Subject: [ft] Handling an embedded CID font using Freetype
Date: Wed, 22 Mar 2017 14:08:08 +0000

Hello

I'm using Freetype to display fonts embedded in pdf data.

My problem seems to be with an embedded CCF file, where the CID mappings is only defined in the pdf data.
I load a Compact File Format (CFF) stream into memory.
But when I try to select a character map, using FT_Select_CharMap, I get error 0x26, Invalid_CharMap_Handle.
I've attached the CFF, font.cff, and a simple c++ program, cff.c, which highlights the problem.

From the pdf file I know that the font is a CID one.
So you can work out the mapping from the PDF strings to Unicode strings.
But this information doesn't seem to be available in the CFF stream.
So my question is how do I handle this situation?
I can't see any way in Freetype to add the missing character encoding.
Do I have to decompress the CFF stream, which should be a type1 font and then explicitly add the missing character encoding information?

I can provide more analysis if necessary but I didn't want to go in to too much technical detail in my first email.

Any advice would be appreciated, regards Tony Smith

Attachment: font.cff
Description: Binary data

Attachment: cff.c
Description: Text Data


reply via email to

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