OTS-VALIDATOR-CHECKER(1)

πŸ’– OTS-VALIDATOR-CHECKER πŸ’–

okay bestie, welcome to ots-validator-checker, the manual page for the font validation checker that ships in section 1 of the manual (User Commands, if you're keeping score) ✨


🌸 NAME 🌸

ots-validator-checker β€” font validation checker πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

ots-validator-checker FONT_FILE

✨ DESCRIPTION ✨

so. ots-validator-checker is a program whose whole entire thing is validating malformed fonts πŸ’…

here's the twist that makes it iconic: if the program detects that the font is invalid, it prints OK and returns with 0 (success). yes, fr fr, that's the design, we love a chaotic queen πŸ‘‘

and if it couldn't detect any errors? then the program goes ahead and opens the transcoded font and renders some characters using FreeType:

transcoded_font = ValidateAndTranscode(malicious_font);
if (validation_error)
  Print("OK");
OpenAndRenderSomeCharacters(transcoded_font);  # may cause SIGSEGV
Print("OK");

so if SEGV doesn't raise inside the FreeType library, the program prints OK and returns with 0 as well 🌈

bestie, listen to me on this one: you should run this tool under the catchsegv(1) or valgrind(1) command so that you can easily verify that all transformed fonts don't crash the library 😭 like, please, it's right there in the example below 🫢

πŸ”₯ EXAMPLES πŸ”₯

look at her go:

$ for f in malformed/*.ttf ; do catchsegv ./ots-validator-checker "$f" ; done
OK: the malicious font was filtered: malformed/1.ttf
OK: the malicious font was filtered: malformed/2.ttf
OK: FreeType2 didn't crash: malformed/3.ttf
OK: the malicious font was filtered: malformed/4.ttf

no cap, every single one of them said OK. main character energy πŸ’–


πŸ’€ REPORTING BUGS πŸ’€

found a bug? report it to <https://github.com/khaledhosny/ots/issues> β€” the devs wanna hear it, not me πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, honestly πŸ’œ


that's the whole page, bestie πŸŽ€ this one came from OpenType Sanitizer, dated May 2021 β€” and that's the vibe check, periodt βœ¨πŸ’…πŸ¦‹