freetype-devel
[Top][All Lists]
Advanced

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

[Devel] CFF & FT_Get_First_Char Problem


From: Ivan Nincic
Subject: [Devel] CFF & FT_Get_First_Char Problem
Date: Thu, 15 May 2003 04:54:42 +0000

Hello,

I have a problem reading glyph outlines from the following Typ1/CFF font:

 http://www3.telus.net/public/ab114139/times.cff

The font has a custom encodings. I tried to extract char-names using the following code:

char buf[2048;
for (int i=0; i<256; ++i) FT_Get_Glyph_Name(face, gindex, buf, 2048);

but got an exception when i==15.

Because this method does not produce char-code to glyph index mapping I tried the following:

int result =  FT_Select_Charmap(face, FT_ENCODING_ADOBE_CUSTOM);
FT_UInt gindex;
FT_ULong charcode = FT_Get_First_Char( face, &gindex );
while (gindex != 0)
{
 ret = FT_Get_Glyph_Name(face, gindex, tmp_buf, tmp_buf_sz);
 charcode = FT_Get_Next_Char(face, charcode, &gindex);
}

however the loop breaks after a single iteration.

What is the best way to extract built-in encoding for Type1/CFF fonts?

Thanx,

Ivan Nincic

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail




reply via email to

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