Font.ttf.cmap.subtable: def of gralha-truetype@0.1.0.1 Import: import gralha-truetype@0.1.0.1/font.bend as Font Lines 717-720 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=717&end_line=720 import Base import gralha-text-scan@0.1.0.1/scan.bend as U import gralha-bytes@0.1.0.1/bytes.bend as Bin # The best Unicode subtable (formats 4 and 12), 0 when the font has none. def ttf.cmap.subtable(+b: Bin.Bytes) -> U32: +cmap = ttf.table(b, 1668112752) U.branch(U32, U32.is_eq(cmap, 0), _ => 0, _ => ttf.cmap.pick(b, U32.to_nat(ttf.u16(b, (cmap + 2 : U32))), cmap, (cmap + 4 : U32), 0, 0)) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=Bytes 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=ttf.cmap.pick https://jend.leeeet.dev/definition.txt?path=gralha-truetype@0.1.0.1/font.bend&name=ttf.table https://jend.leeeet.dev/definition.txt?path=gralha-truetype@0.1.0.1/font.bend&name=ttf.u16