diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-12 16:59:21 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-12 16:59:21 +0200 |
| commit | e94627721db89c3b08aa17f54d59d19a09f7816f (patch) | |
| tree | 01d5f64d48beaa1c5edc848f9a2a6fe5b36386d7 /main | |
| parent | a2a68106c025ada726e291df4d7e5aa624f68410 (diff) | |
Adapt to fontdock 🔼
Diffstat (limited to 'main')
| -rw-r--r-- | main/src/main.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/main/src/main.rs b/main/src/main.rs index c2bc6d13..832849b8 100644 --- a/main/src/main.rs +++ b/main/src/main.rs @@ -4,7 +4,7 @@ use std::io::BufWriter; use std::path::{Path, PathBuf}; use std::rc::Rc; -use fontdock::fs::{FsIndex, FsProvider}; +use fontdock::fs::{FsIndex, FsSource}; use futures_executor::block_on; use typstc::diag::{Feedback, Pass}; @@ -38,10 +38,11 @@ fn main() { index.search_dir("fonts"); index.search_os(); - let (descriptors, files) = index.into_vecs(); - let provider = FsProvider::new(files); - let loader = FontLoader::new(Box::new(provider), descriptors); - let loader = Rc::new(RefCell::new(loader)); + let (files, descriptors) = index.into_vecs(); + let loader = Rc::new(RefCell::new(FontLoader::new( + Box::new(FsSource::new(files)), + descriptors, + ))); let state = State::default(); let Pass { |
