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 {
|
if fm.exit_code == 0 {
|
||||||
lines := fm.output.split('\n')
|
lines := fm.output.split('\n')
|
||||||
for l in lines {
|
for l in lines {
|
||||||
if l.contains('file:') && !l.contains('.ttc') {
|
if !l.contains('.ttc') {
|
||||||
font := l.find_between('"', '"')
|
debug_font_println('Using font "$l"')
|
||||||
debug_font_println('Using font "$font"')
|
return l
|
||||||
return font
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue