gg: don't call `os.is_file()` on Android (the font is part of the APK there) (#6475)
parent
abc98c273c
commit
ae48b709ed
|
@ -105,7 +105,10 @@ fn gg_init_sokol_window(user_data voidptr) {
|
|||
// fb_h := sapp.height()
|
||||
// println('g.scale=$g.scale is_high_dpi=$is_high_dpi fb_w=$fb_w fb_h=$fb_h')
|
||||
// if g.config.init_text {
|
||||
if g.config.font_path != '' && os.is_file( g.config.font_path ) {
|
||||
|
||||
// `os.is_file()` won't work on Android if the font file is embedded into the APK
|
||||
exists := $if !android { os.is_file(g.config.font_path) } $else { true }
|
||||
if g.config.font_path != '' && exists {
|
||||
// t := time.ticks()
|
||||
g.ft = new_ft({
|
||||
font_path: g.config.font_path
|
||||
|
|
Loading…
Reference in New Issue