Created
March 4, 2020 23:44
-
-
Save madig/865f8c7fbc309fd0c1f1914f7dccc1bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use norad::Ufo; | |
use std::thread; | |
// static SOURCE1: &str = "/home/nikolaus/Entwicklung/cantarell-fonts/src/Cantarell-Light.ufo"; | |
// static SOURCE2: &str = "/home/nikolaus/Entwicklung/cantarell-fonts/src/Cantarell-Regular.ufo"; | |
// static SOURCE3: &str = "/home/nikolaus/Entwicklung/cantarell-fonts/src/Cantarell-Bold.ufo"; | |
static SOURCE1: &str = "/home/nikolaus/Entwicklung/noto-sans-interpolation/NotoSans-Light.ufo"; | |
static SOURCE2: &str = "/home/nikolaus/Entwicklung/noto-sans-interpolation/NotoSans-Regular.ufo"; | |
static SOURCE3: &str = "/home/nikolaus/Entwicklung/noto-sans-interpolation/NotoSans-Bold.ufo"; | |
static META_CREATOR: &str = "org.linebender.norad"; | |
fn main() { | |
let child1 = thread::spawn(move || { | |
let mut my_ufo = Ufo::load(SOURCE1).unwrap(); | |
my_ufo.meta.creator = META_CREATOR.to_string(); | |
my_ufo.save("/home/nikolaus/Entwicklung/linebender/tmp/test1.ufo").unwrap(); | |
}); | |
let child2 = thread::spawn(move || { | |
let mut my_ufo = Ufo::load(SOURCE2).unwrap(); | |
my_ufo.meta.creator = META_CREATOR.to_string(); | |
my_ufo.save("/home/nikolaus/Entwicklung/linebender/tmp/test2.ufo").unwrap(); | |
}); | |
let child3 = thread::spawn(move || { | |
let mut my_ufo = Ufo::load(SOURCE3).unwrap(); | |
my_ufo.meta.creator = META_CREATOR.to_string(); | |
my_ufo.save("/home/nikolaus/Entwicklung/linebender/tmp/test3.ufo").unwrap(); | |
}); | |
child1.join().unwrap(); | |
child2.join().unwrap(); | |
child3.join().unwrap(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment