|
From: | McBride, Martin |
Subject: | [ft-devel] Problem font |
Date: | Mon, 25 Feb 2008 11:40:20 -0000 |
Hi, I wondered if anyone had encountered a problem
similar to this, or could recommend a solution. I have a TrueType font with a problem which prevents
FreeType from reading its cmap. The font has a format 4 cmap. The final entry
has start and end of 0xFFFF, delta of 1, all fine, but the offset is 0x342F,
which is far outside of the table. FreeType checks the offset and rejects the
cmap as a consequence. The TT spec says “[the final] segment
need not contain any valid mappings. It can simply map the single character
code Unless I have misunderstood the spec, I think the only way
to read this font would be by making the assumption above, ie for the last
segment, if start and end are 0xFFFF, and delta is 1, force the offset to 0.
There is already code to handle offset==0xFFFF in this special case, this
change would extend it to handle any invalid offset. I think it would require
minor changes in tt_cmap4_validate, tt_cmap4_char_map_linear and
tt_cmap4_char_map_binary. Is this a sensible way to proceed, or is it likely to break
other things? Regards Martin |
[Prev in Thread] | Current Thread | [Next in Thread] |