glyphslib 0.2.6

A Rust library for reading, writing, and manipulating Glyphs font source files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::path::Path;

fn main() {
    let input = std::env::args().nth(1).expect("Please provide a file path");
    let output = std::env::args()
        .nth(2)
        .expect("Please provide an output file path");
    let start = std::time::Instant::now();
    let font = glyphslib::Font::load(Path::new(&input)).expect("Failed to read font file");
    let elapsed = start.elapsed();
    let start = std::time::Instant::now();
    println!("Loaded font in: {elapsed:?}");
    font.save(Path::new(&output))
        .expect("Failed to save font file");
    let elapsed = start.elapsed();
    println!("Saved font in: {elapsed:?}");
}