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:
[]
= "0.1"
Quick Start
use ;
use Path;
// Load a Glyphs file
let font = load?;
// Access font properties
let font_ref = font.as_ref;
println!;
println!;
println!;
// Iterate through glyphs
for glyph in font_ref.glyphs
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.