libfonthelper 0.3.9

Reads fonts in passed directories and return objects of fonts for Figma Font Helper
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate libfonthelper;

use libfonthelper::FontsHelper;

fn main() {
  let dirs = vec![
    String::from("/usr/share/fonts"),
    String::from("/home/ruut/.local/share/fonts"),
    String::from("/home/ruut/.local/share/bad_fonts"),
    String::from("/home/ruut/.local/share/fonts/Segoe"),
  ];

  let fonts = FontsHelper::new(&dirs);

  for font in fonts {
    println!("Font entry: {}, count: {}", font.path, font.entries.len());
  }
}