freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Incomplete cmap table for platform 0 (Apple Unicode)


From: Dmitry Timoshkov
Subject: Re: [ft-devel] Incomplete cmap table for platform 0 (Apple Unicode)
Date: Mon, 1 Oct 2007 11:52:19 +0900

<address@hidden> wrote:

Your patch assumes that Apple Unicode cmap is often
broken but others are more reliable, but I'm afraid
that this is not generic assumption.

That was really a hack to show that other cmap tables actually
work better for that font. Of course other fonts can have cmap
tables for other platfoms rather than 0 "broken".

Excuse me, do you think the selection of best cmap is
the role of FreeType? I think, FreeType2 provides an
API for users to select cmap subtable by the pair of
platformID & platform-specificID.
http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html

I think, it's better for Wine to have internal priorities
of "prefered" cmap and try to load from the best to
the worst. For example, thinking about UCS-4 capable fonts
(like SURSONG.TTF or SIMSUN-EXTB.TTF). Such fonts have
cmap subtables for Microsoft UCS2, and Microsoft UCS4.
Usually Microsoft UCS4 cmap subtable appears after MS
UCS2 cmap subtable. So, if we let FreeType to choose the
cmap subtable automatically, we cannot reach Microsoft
UCS4 cmap subtable, even if we ignore Apple Unicode.
From the viewpoint of compatibility with Microsoft products,
it's not good idea.

So, I think, it's better for Wine to have internal priorities
of "prefered" cmap subatble and choose the best cmap subatble
by himself. How do you think of?

Wine uses FT_Select_Charmap API to select either FT_ENCODING_UNICODE,
FT_ENCODING_MS_SYMBOL or FT_ENCODING_APPLE_ROMAN when appropriate.
So that's actually Freetype's responsibility to choose the best/correct/
working charmap table in that case.

Yes, Wine can arrange some kind of cmap priorites, what if some of "preferred"
cmap tables is broken? How an application can decide which cmap table is better
without digging into internal cmap data? Shouldn't that be a responsibility of
Freetype to ignore incomplete/broken cmaps, especially since it already parses
cmap tables and can easily decide which one is better?

--
Dmitry.




reply via email to

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