1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:37:34 +00:00

Utilities: Add ttfdisasm for disassembling OpenType instructions

This utility when given a .tff font provides options for disassembling:

 - The 'fpgm' table, this a program that's run once when the font is
   loaded. It's used to define instructions and functions used by used
   by other programs.

 - The 'prep' table, this is a general program that's run when ever
   the font size (or other properties) changes.

 - And the programs associated with any individual glyph.

The disassembly is printed in a format that matches the examples from:
https://learn.microsoft.com/en-us/typography/opentype/spec/tt_instructions

I'm mainly adding this because I think it's neat to be able to look
at these things, and think it'll be helpful for debugging an
interpreter.

With this you can see that all of the LiberationSerif-XXX.tff fonts in
Serenity have these programs ready to go.
This commit is contained in:
MacDue 2023-01-08 23:03:39 +00:00 committed by Andreas Kling
parent 768dc4cda1
commit 1cf45ee930
3 changed files with 201 additions and 0 deletions

View file

@ -117,6 +117,7 @@ target_link_libraries(shot PRIVATE LibGfx LibGUI LibIPC)
target_link_libraries(sql PRIVATE LibLine LibSQL LibIPC)
target_link_libraries(su PRIVATE LibCrypt)
target_link_libraries(syscall PRIVATE LibSystem)
target_link_libraries(ttfdisasm PRIVATE LibGfx)
target_link_libraries(tar PRIVATE LibArchive LibCompress)
target_link_libraries(telws PRIVATE LibProtocol LibLine)
target_link_libraries(test-fuzz PRIVATE LibGemini LibGfx LibHTTP LibIPC LibJS LibMarkdown LibRegex LibShell)