![]() Simply dumping the font out and recompiling it with ttx ( ) should do the trick. If the problem is just a bad checksum, it's fairly easy to correct. accidentally using a random data file as a font). This will catch cases where font data is obviously corrupt (e.g. The validation code also checks to make sure that the table directory is sensible, that none of the offset/length values point to data past the end of font data. I'm fairly sure this calculation is correct, it's not that complex and no fonts would load if it wasn't correct. One of them is a checksum check, which simply validates that the sum of the table header checksums matches the checksum in the 'head' table. I suspect (2) is more likely given that the four Bitstream Vera fonts with problems have a header claiming the checksum is 0xFFF00000 (unless we're getting *that* wrong).īefore loading a font we perform some simple sanity checks in gfxFontUtils::ValidateSFNTHeaders. (2) it's common for fonts to have bad checksums since other systems that use fonts don't check them. (1) there's something wrong with our checksum computation code that causes it to fail in some cases I also noticed that both regular and italic monofur from fail to load. ![]() Though I think Serif Regular is also a problem.) (Or maybe it's not exactly that set I tried modifying the testcase locally to rename the families to avoid collisions with locally installed ones, and I got confusing results. One testcase is (from the comments I mentioned two paragraphs up) in which Bitstream Vera Sans Bold, Bitstream Vera Sans Oblique, Bitstream Vera Serif, and Bitstream Vera Serif Bold fail to load. I've run into a decent number of fonts that fail this test, and that we therefore don't load. This was initially reported in bug 70132 comment 173 (see from there to bug 70132 comment 182).Ĭurrently gfxFontUtils::ValidateSFNTHeaders checks that the font checksum is correct.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |