def text.expand

gralha-svg-render@0.1.0.1 · svg.bend:3634

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-xml-doc@0.1.0.1/xml.bend as XML

3634def text.expand(xs: List<&2, XML.Element>, +font: TextFont, +w: F32, +h: F32, +root: Bool) -> List<&2, XML.Element>:
3635  match xs:
3636    case Nil{}: Nil{}
3637    case Con{XML.Element{n, as, kids, txt}, rest}:
3638      +tagname = n
3639      +attrs = as
3640      Con{text.expand.node(tagname, attrs, kids, txt, font, element.viewport(tagname, attrs, identity(), w, h, root),
3641        nodes => f => vw => vh => text.expand(nodes, f, vw, vh, False{})), text.expand(rest, font, w, h, root)}

Uses (8)

Used by (1)