commit | 64adb055526e6690357cd01efd6b5e4c205e0692 | [log] [tgz] |
---|---|---|
author | Khaled Hosny <khaledhosny@eglug.org> | Fri Mar 01 17:44:40 2019 |
committer | Khaled Hosny <khaledhosny@eglug.org> | Fri Mar 01 17:58:10 2019 |
tree | 905bcb661a783c0a0647c5cd1368aec8c0b0a837 | |
parent | 6ca345f404520bde17052121122bbdb674feebbf [diff] |
[glyf] Fix miscalculated maxp.maxSizeOfInstructions When maxp.maxSizeOfInstructions and the bytecode mismatch, fix the former and warn instead of rejecting the font. Fixes https://github.com/khaledhosny/ots/issues/181
The OpenType Sanitizer (OTS) parses and serializes OpenType files (OTF, TTF) and WOFF and WOFF2 font files, validating them and sanitizing them as it goes.
The C library is integrated into Chromium and Firefox, and also simple command line tools to check files offline in a Terminal.
The CSS font-face property is great for web typography. Having to use images in order to get the correct typeface is a great sadness; one should be able to use vectors.
However, on many platforms the system-level TrueType font renderers have never been part of the attack surface before, and putting them on the front line is a scary proposition... Especially on platforms like Windows, where it's a closed-source blob running with high privilege.
Instructions below are for building standalone OTS utilities, if you want to use OTS as a library then the recommended way is to copy the source code and integrate it into your existing build system. Our build system does not build a shared library intentionally.
Build OTS:
$ meson build $ ninja -C build
Run the tests (if you wish):
$ ninja -C build test
See docs
Thanks to Alex Russell for the original idea.