Font.ttf.contour.last: def of gralha-truetype@0.1.0.1 Import: import gralha-truetype@0.1.0.1/font.bend as Font Lines 468-476 of gralha-truetype@0.1.0.1/font.bend: https://jend.leeeet.dev/read.txt?path=gralha-truetype@0.1.0.1/font.bend&start_line=468&end_line=476 import Base import gralha-text-scan@0.1.0.1/scan.bend as U # A contour starts at its first on-curve point; when the first point is off-curve, # the last point starts it if on-curve, else the implied midpoint between last and first. def ttf.contour.last(+first: TTPoint, +rest: List<&2, TTPoint>, last: TTPoint) -> String: TTPoint{lx, ly, lon} = last +x = lx +y = ly U.branch(String, lon, _ => "M" ++ ttf.pair(TTPoint{x, y, True{}}) ++ ttf.walk(Con{first, ttf.init(rest)}, None{}, TTPoint{x, y, True{}}), _ => ttf.contour.implied(ttf.mid(first, TTPoint{x, y, False{}}), first, rest)) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=branch https://jend.leeeet.dev/definition.txt?path=gralha-truetype@0.1.0.1/font.bend&name=TTPoint https://jend.leeeet.dev/definition.txt?path=gralha-truetype@0.1.0.1/font.bend&name=ttf.contour.implied https://jend.leeeet.dev/definition.txt?path=gralha-truetype@0.1.0.1/font.bend&name=ttf.init https://jend.leeeet.dev/definition.txt?path=gralha-truetype@0.1.0.1/font.bend&name=ttf.mid https://jend.leeeet.dev/definition.txt?path=gralha-truetype@0.1.0.1/font.bend&name=ttf.pair https://jend.leeeet.dev/definition.txt?path=gralha-truetype@0.1.0.1/font.bend&name=ttf.walk