7 releases
| 0.2.4 | Feb 17, 2026 |
|---|---|
| 0.2.3 | Feb 2, 2026 |
| 0.2.2 | Jan 14, 2026 |
| 0.2.1 | Dec 17, 2025 |
| 0.1.0 | Nov 28, 2025 |
#2175 in Parser implementations
Used in babelfont
2.5MB
4.5K
SLoC
glyphslib
A Rust library for reading, writing, and manipulating Glyphs font source files (.glyphs and .glyphspackage).
Features
- Full format support: Read and write both Glyphs 2 and Glyphs 3 file formats
- Type-safe: Strongly typed structures for all font data
- Unified interface: Work with either format through the
GlyphsFiletrait - Format conversion: Convert between Glyphs 2 and Glyphs 3 formats
- Comprehensive: Access and modify all font data including masters, instances, glyphs, layers, paths, components, anchors, and more
Installation
Add this to your Cargo.toml:
[dependencies]
glyphslib = "0.1"
Quick Start
use glyphslib::{Font, GlyphsFile};
use std::path::Path;
// Load a Glyphs file
let font = Font::load(Path::new("MyFont.glyphs"))?;
// Access font properties
let font_ref = font.as_ref();
println!("Family: {}", font_ref.family_name());
println!("Masters: {}", font_ref.masters().len());
println!("Glyphs: {}", font_ref.glyphs().len());
// Iterate through glyphs
for glyph in font_ref.glyphs() {
println!(" {}: {} layers", glyph.name(), glyph.layers().len());
}
See also
glyphs-reader is a similar crate for reading Glyphs files, but does not preserve the difference between Glyphs 2 and Glyphs 3 formats, nor does it support writing.
Documentation
For detailed documentation and examples, see the API documentation.
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.