Only load TTF fonts for now, additional font types will need to be manually added

Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
This commit is contained in:
Nate Butler 2023-08-09 11:38:02 -04:00
parent 183c292a5c
commit af388e7f9c

View File

@ -654,6 +654,10 @@ fn load_embedded_fonts(app: &App) {
let embedded_fonts = Mutex::new(Vec::new());
smol::block_on(app.background().scoped(|scope| {
for font_path in &font_paths {
if !font_path.ends_with(".ttf") {
continue;
}
scope.spawn(async {
let font_path = &*font_path;
let font_bytes = Assets.load(font_path).unwrap().to_vec();