[WIP] Sanitize otf fonts with ots-sanitize (Closes: #22)#28
[WIP] Sanitize otf fonts with ots-sanitize (Closes: #22)#28norbusan wants to merge 1 commit intofred-wang:mainfrom
Conversation
|
Hi @fred-wang
Thanks! |
|
@norbusan thanks a lot for working on this!
I would say whatever format is provided by upstream developer: otf, ttf or woff2/woff. ots-sanitize support all these formats, right?
I think we should always try and use the upstream versions when provided. If they fail, we should report the issue to the upstream developer so they can fix it.
That sounds fine. I think the Maybe we can add options to skip some build steps like the one to generate the testcase and this ots check, so people could still compile the fonts without the full deps. But not sure it's super important right now. |
|
Thanks @fred-wang for the answers. Two more questions:
|
I think all fonts yes.
OK I didn't realize that. Is it possible to just run ots thing to check whether the font is valid ? I think we should really just use fonts provided by upstream. WOFF is just zlib compression and WOFF2 brotli conversion + minor tweak in glyph paths. I don't think we should do any bigger changes (e.g. dropping tables). Doing so could violate the OFL with reserved font names (see https://openfontlicense.org/webfonts-and-reserved-font-names/ ; woff and woff2 are explicitly mentioned as ok there). |
Yes, that is possible. Ok, then I know what I need:
Thanks, will look into it. |
|
Ah, there is one more thing: How to deal with files that can be sanitized but would change when running ots-sanitize? Example: or The sanitization changed the .woff2 file and gave a warning, but the return values is 0 and it was sanitized successfully. Also, even if there is NO warning output, the file is actually changes: I am not really sure now what we want, i.e., when do we want to ship out warnings/stop building? |
Sanitize fonts with ots-sanitize