1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 11:07:46 +00:00

LibGfx: Add OpenType opcodes and helpers to parse instruction streams

This defines all the OpenType opcodes/instructions from the
specification:
https://learn.microsoft.com/en-us/typography/opentype/spec/tt_instructions

Each instructions has mnemonic and a range of possible opcodes (as some
of the bits are pretty much immediate value flags).

There's a little helper Instruction struct for accessing the flags and
any associated data (in the case of PUSH instructions).

Then the InstructionStream provides a way of iterating over all the
instructions in some bytes.
This commit is contained in:
MacDue 2023-01-08 22:50:12 +00:00 committed by Andreas Kling
parent 652f87821b
commit 3b282ba8bb
3 changed files with 377 additions and 0 deletions

View file

@ -21,6 +21,7 @@ set(SOURCES
Font/OpenType/Cmap.cpp
Font/OpenType/Font.cpp
Font/OpenType/Glyf.cpp
Font/OpenType/Hinting/Opcodes.cpp
Font/PathRasterizer.cpp
Font/ScaledFont.cpp
Font/Typeface.cpp