freetype-devel
[Top][All Lists]
Advanced

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

[Devel] FTC_CMapCache_Lookup in Freetype-2.1.8


From: Lin KJ
Subject: [Devel] FTC_CMapCache_Lookup in Freetype-2.1.8
Date: Thu, 3 Jun 2004 00:53:26 +0800 (CST)

Hi All,

I downloaded the freetype-2.1.8 from the ftp size.
In the ChangeLog, it wrote:
"- the "FTC_CMapCache_Lookup" function has changed its signature, charmaps can now only be retrieved by index".
In the previous version, the index of a glyph can be translated by FTC_CMapCache with FTC_CMAP_BY_ENCODING, FTC_CMAP_BY_INDEX or FTC_CMAP_BY_ID.
I am curious that why the "FTC_CMapCache_Lookup" was changed to retrieve the charmap by index only.
If i want to use the charmap cache to translate a character code into glyph index by encoding, how should i do?
In the previous version, i can prepare a charmap descriptor handle with "FTC_CMAP_BY_ENCODING"and call the "FTC_CMapCache_Lookup" to get the glyph index.
Look like following:

FTC_CMapDescRec cmap_desc;

cmap_desc.face_id = (void*)1;
cmap_desc.type = FTC_CMAP_BY_ENCODING;
cmap_desc.u.encoding = FT_ENCODING_BIG5;
glyph_idx = FTC_CMapCache_Lookup(cmap_cache, &cmap_desc, glyph_code);

In the version 2.1.8, how should i do?
Thanks

KJ



抄近路!!Email處處收!
Yahoo!奇摩捷徑列 免費下載
reply via email to

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