Svg.text.measure: def of gralha-svg-render@0.1.0.1 Import: import gralha-svg-render@0.1.0.1/svg.bend as Svg Lines 3179-3183 of gralha-svg-render@0.1.0.1/svg.bend: https://jend.leeeet.dev/read.txt?path=gralha-svg-render@0.1.0.1/svg.bend&start_line=3179&end_line=3183 import Base import gralha-text-scan@0.1.0.1/scan.bend as U def text.measure(+num: U.Number, ref: F32, +size: F32) -> F32: U.Number{x, tail, ok} = num +t = tail U.choose(F32, U.prefix(t, "em"), (x * size : F32), U.choose(F32, U.prefix(t, "ex"), (x * size * 0.536 : F32), U.choose(F32, U.prefix(t, "rem"), (x * 16.0 : F32), U.unit(num, ref)))) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=Number https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=choose https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=prefix https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=unit