gg: fix system_font_path (#12533)
parent
243e66a106
commit
480f3876ee
|
@ -76,14 +76,13 @@ pub fn system_font_path() string {
|
|||
}
|
||||
}
|
||||
}
|
||||
mut fm := os.execute('fc-match -v -s -b')
|
||||
mut fm := os.execute("fc-match --format='%{file}\n' -s")
|
||||
if fm.exit_code == 0 {
|
||||
lines := fm.output.split('\n')
|
||||
for l in lines {
|
||||
if l.contains('file:') && !l.contains('.ttc') {
|
||||
font := l.find_between('"', '"')
|
||||
debug_font_println('Using font "$font"')
|
||||
return font
|
||||
if !l.contains('.ttc') {
|
||||
debug_font_println('Using font "$l"')
|
||||
return l
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue