cmap format4 structure question

Bob Hallissy bobh528 at yahoo.com
Fri Jan 24 01:38:04 CET 2014


About format 4 cmap subtables, the spec says:
> For the search to terminate, the final endCode value must be 0xFFFF. 
> This segment need not contain any valid mappings. (It can just map the 
> single character code 0xFFFF to missingGlyph). However, the segment 
> must be present.

Is it correct to say that the final segment /may/ map characters 
preceding 0xFFFF, as long as 0xFFFF is the endCode value of this final 
segment?

For example, is it legal to have a final segment described by:

    startCode = 0xFFFC
    endCode = 0xFFFF
    idDelta = 0
    idRangeOffset calculated to reference the final 4 values in the
    glyphIdArray.

?

I have created a small font that has such a final segment in the format 
4 cmap subtables. You can view/download this font at

https://drive.google.com/file/d/0B8wtA_xvdI4-dGRlOEczYTI5eGs/edit?usp=sharing

OTSanitizer built into Firefox seems to accept the font just fine, and 
Font Validator does not complain about the cmap table.

However Windows 7 (and 8.1 I believe) will not install or preview the 
font, complaining that it is "not a valid font file", unless I change 
the cmap so that the final segment has both startCode and endCode of 
0xFFFF.

So is the above structure valid or not?

Thanks,

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20140123/1cdd60f6/attachment.html>


More information about the mpeg-otspec mailing list