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
extern crate regex;

use std::fs::DirEntry;

use regex::Regex;

pub fn filter_files(entry: &DirEntry) -> bool {
  let regex = Regex::new(".+\\.(tt[fc]|otf)").unwrap();
  if regex.is_match(entry.file_name().to_str().unwrap()) {
    return true;
  }

  false
}