1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: use gg.system_font_path() as a fallback when a font can not be found

This commit is contained in:
Delyan Angelov 2020-12-07 21:40:24 +02:00
parent 0efdc7bbe8
commit ed9aa873c1
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -128,7 +128,12 @@ fn gg_init_sokol_window(user_data voidptr) {
g.font_inited = true g.font_inited = true
} else { } else {
if !exists { if !exists {
eprintln('font file $g.config.font_path does not exist') sfont := system_font_path()
eprintln('font file "$g.config.font_path" does not exist, the system font was used instead.')
g.ft = new_ft(font_path: sfont, custom_bold_font_path: g.config.custom_bold_font_path, scale: sapp.dpi_scale()) or {
panic(err)
}
g.font_inited = true
} }
} }
// //