def ttf.contours

gralha-truetype@0.1.0.1 · font.bend:505

import gralha-truetype@0.1.0.1/font.bend as Font
import Base

505def ttf.contours(+pts: List<&2, TTPoint>, ends: List<&2, U32>, +index: U32) -> String:
506  match ends:
507    case Nil{}: ""
508    case Con{e, more}:
509      +eDup = e
510      +n = U32.to_nat((eDup + 1 - index : U32))
511      ttf.contour(ttf.take(n, pts)) ++ ttf.contours(ttf.drop(n, pts), more, (eDup + 1 : U32))

Uses (11)

Used by (1)