def ttf.assemble.child

gralha-truetype@0.1.0.1 · font.bend:352

import gralha-truetype@0.1.0.1/font.bend as Font
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
import gralha-bytes@0.1.0.1/bytes.bend as Bin

352def ttf.assemble.child(+b: Bin.Bytes, +f: TTFont, frame: TTFrame, parents: List<&2, TTFrame>, loc: U32 & U32, +place: TTPlace, +next: U32) -> List<&2, TTFrame>:
353  TTFrame{at, acc, fplace} = frame
354  (g, len) = loc
355  +gg = g
356  +ac = acc
357  +fp = fplace
358  +ps = parents
359  +contours = ttf.u16(b, gg)
360  U.branch(List<&2, TTFrame>, U32.is_eq(len, 0), _ => Con{TTFrame{next, ac, fp}, ps},
361    _ => U.branch(List<&2, TTFrame>, U32.is_ge(contours, 32768),
362      _ => Con{TTFrame{(gg + 10 : U32), ttf.glyph.empty(), place}, Con{TTFrame{next, ac, fp}, ps}},
363      _ => Con{TTFrame{next, ttf.place(ac, ttf.simple(b, gg, contours), place), fp}, ps}))

Uses (16)

Used by (1)