freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] cmap in webdings


From: David Turner
Subject: Re: [Devel] cmap in webdings
Date: Wed, 22 May 2002 02:59:45 +0200

Hello Dirck,

Dirck Blaskey a écrit :
> 
> I have a pdf file with an embedded True Type font, webdings,
> that has some oddities with its cmap, so FT_Get_Char_Index
> wasn't working.
>
In other words, the embedded font is buggy... Humm...
 
> The cmap doesn't explicitly cover the character ranges,
> most of the entries have startCount == endCount.
> 
> Here is a patch to Freetype 2.0.9 sfnt/ttcmap.c;
> The patch should work with the current development snapshot.
> 
> In theory, there might be a problem with the patch,
> when looking for characters that _really_ aren't there.
> Maybe an additional check for startCount == endCount?
> Is there any safe way to be sure?
>

I'm sorry, but I'm going to reject this patch for the moment.
I have studied it, the charmap you describe as well as the
original webdings.ttf font. I simply cannot think of any
reasonable way to ensure reliable support for both correct
fonts per se the TrueType/OpenType specs and the broken one
you're using.

If you can come up with a scheme that would ensure reliable
charmap indexing in all cases, I'd be happy to incorporate
it within FreeType. Your patch unfortunately doesn't provide
enough guarantees about the correctness of the returned
function.

That's not to say that a solution is impossible, simply that
I couldn't come up with something satisfying myself.


Best Regards,

- David Turner
- The FreeType Project  (www.freetype.org)

PS: By the way, if you intend to perform some doctoring, please
    be aware that the code in "src/sfnt/ttcmap.c" is being
    replaced by the one in "src/sfnt/ttcmap0.c" (found in 2.1.0)

    this one directly parses the table's raw bytes, and doctoring
    is not directly allowed there, since we may be accessing ROM
    or memory-mapped files in certain cases...



reply via email to

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