def ttf.component.next
import gralha-truetype@0.1.0.1/font.bend as Fontimport Base
import gralha-text-scan@0.1.0.1/scan.bend as U
331# Byte offset of the component after the one at `at`, or 0 when it was the last.
332def ttf.component.next(+at: U32, +flags: U32) -> U32:
333 +at2 = (at + U.choose(U32, ttf.bit(flags, 1), 8, 6) : U32)
334 +at3 = (at2 + U.choose(U32, ttf.bit(flags, 8), 2, U.choose(U32, ttf.bit(flags, 64), 4, U.choose(U32, ttf.bit(flags, 128), 8, 0))) : U32)
335 U.choose(U32, ttf.bit(flags, 32), at3, 0)