Accept .otf files

ttf_parser (used by rustybuzz and femtovg) supports them, and Qt supports them, too.
This commit is contained in:
Simon Hausmann 2021-06-03 10:55:58 +02:00
parent d5ac54a833
commit 96aeffa092

View file

@ -132,7 +132,10 @@ impl Document {
let custom_fonts = foreign_imports let custom_fonts = foreign_imports
.into_iter() .into_iter()
.filter_map(|import| { .filter_map(|import| {
if import.file.ends_with(".ttc") || import.file.ends_with(".ttf") { if import.file.ends_with(".ttc")
|| import.file.ends_with(".ttf")
|| import.file.ends_with(".otf")
{
Some(import.file) Some(import.file)
} else { } else {
diag.push_error( diag.push_error(