struct
GlyphSet
pub struct GlyphSet {
pub units_per_em: f32,
pub line_gap: f32,
pub depth: f32,
pub bevel: f32,
pub glyphs: Vec<(char, f32, Mesh)>,
pub kerning: Vec<(u32, u32, f32)>,
}Glyphs made ahead of time (weft assets font): metrics, kerning and a mesh per character, at one depth and bevel.
Fields
kerning
pub kerning: Vec<(u32, u32, f32)>(left, right, adjustment in font units), by index into glyphs.
Methods
to_bytes
pub fn to_bytes(&self) -> Vec<u8>As .wfont bytes: the glyphs as a .wmodel (one node per character) after a small header.
from_bytes
pub fn from_bytes(b: &[u8]) -> Result<GlyphSet, String>Read a glyph set from a .wfont file's bytes.