gg: fix system_font_path on Linux (#12477)

pull/12481/head
kahsa 2021-11-16 18:14:35 +09:00 committed by GitHub
parent bede0587ad
commit 3f37ab2ef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -76,11 +76,11 @@ pub fn system_font_path() string {
}
}
}
mut fm := os.execute('fc-match -v')
mut fm := os.execute('fc-match -v -s -b')
if fm.exit_code == 0 {
lines := fm.output.split('\n')
for l in lines {
if l.contains('file:') {
if l.contains('file:') && !l.contains('.ttc') {
font := l.find_between('"', '"')
debug_font_println('Using font "$font"')
return font