Skip to content

codepoint_iter() for iterating through the codepoints supplied by a font

Jeremy Soller requested to merge SiegeEngine:master into master

Created by: mikedilger

I have need to iterate through the codepoints in a font (to make font atlases for a game). So I created a codepoint iterator that works for some (the most common?) ttf formats. I think the original stb_truetype.h file probably has a query API that looks different, I wrote this one from scratch based on the Microsoft page https://docs.microsoft.com/en-us/typography/opentype/spec/cmap#format-4-segment-mapping-to-delta-values. Only tested for format 4.

Merge request reports