diff --git a/vlib/gg/gg.v b/vlib/gg/gg.v index a9dd2cae6b..ac06724801 100644 --- a/vlib/gg/gg.v +++ b/vlib/gg/gg.v @@ -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