def text.path.offset

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

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

3326def text.path.offset(+num: U.Number, +total: F32, +calibration: F32, em: F32) -> F32:
3327  U.Number{x, suffix, valid} = num
3328  (text.measure(num, total, em) * U.choose(F32, U.prefix(suffix, "%") || F32.is_le(calibration, 0.0), 1.0, (total / calibration : F32)) : F32)

Uses (9)

Used by (1)