mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: fix font does not exist message in fireworks
This commit is contained in:
parent
ba3342a034
commit
06b660666b
@ -1,3 +1,4 @@
|
||||
import os
|
||||
import objects
|
||||
import gg
|
||||
import gx
|
||||
@ -54,6 +55,11 @@ fn on_frame(mut app App) {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
mut font_path := os.resource_abs_path(os.join_path('../assets/fonts/', 'RobotoMono-Regular.ttf'))
|
||||
$if android {
|
||||
font_path = 'fonts/RobotoMono-Regular.ttf'
|
||||
}
|
||||
|
||||
mut app := &App{}
|
||||
|
||||
app.gg = gg.new_context(
|
||||
@ -64,6 +70,7 @@ fn main() {
|
||||
use_ortho: true
|
||||
user_data: app
|
||||
frame_fn: on_frame
|
||||
font_path: font_path
|
||||
)
|
||||
|
||||
app.gg.run()
|
||||
|
Loading…
Reference in New Issue
Block a user