mirror of
https://github.com/maplibre/martin.git
synced 2024-12-30 02:11:48 +03:00
9b112ae7b9
This implements dynamic font protobuf generation, allowing users to request font ranges on the fly, and combining them in any order, e.g. `Font1,Font2,Font3`, same as with sprites and tiles This is a first iteration, without any multithreading support. In theory, this could be done far faster by generating SDFs with multiple threads. ### Current process * during init, figure out all glyphs available in each font, and store them as a bitset * during request: * combine requested bitsets to figure out which glyph should come from which font file * load those glyphs from files (using a single instance of the freetype lib) * convert them to SDFs and package them into a protobuf --------- Co-authored-by: Lucas <zhangyijunmetro@hotmail.com>
130 KiB
Executable File
130 KiB
Executable File