mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gg: fix system_font_path (#12533)
This commit is contained in:
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
Block a user