Crate pbf_font_tools[−][src]
PBF Font Tools
Tools for working with SDF font glyphs in PBF format.
This crate lets you combine multiple glyphs from multiple fonts into a single stack. Generating glyphs from a TrueType/OpenType font (a la node-fontnik) is planned for a future release.
References
- https://github.com/mapbox/glyph-pbf-composite
- https://github.com/klokantech/tileserver-gl/blob/master/src/utils.js
Modules
glyphs | Generated file from |
Functions
combine_glyphs | Combines a list of SDF font glyphs into a single glyphs message. All input font stacks are flattened into a single font stack containing all the glyphs. The input order indicates precedence. If the same glyph ID is encountered multiple times, only the first will be used. |
get_font_stack | Generates a single combined font stack for the set of fonts provided. |
load_glyphs | Loads a single font PBF slice from disk. |