mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: intelligent line wrap for trailing struct syntax (#7309)
This commit is contained in:
16
vlib/gg/gg.v
16
vlib/gg/gg.v
@@ -121,18 +121,22 @@ fn gg_init_sokol_window(user_data voidptr) {
|
||||
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, custom_bold_font_path: g.config.custom_bold_font_path, scale: sapp.dpi_scale()) or {
|
||||
panic(err)
|
||||
}
|
||||
g.ft = new_ft(
|
||||
font_path: g.config.font_path
|
||||
custom_bold_font_path: g.config.custom_bold_font_path
|
||||
scale: sapp.dpi_scale()
|
||||
) or { panic(err) }
|
||||
// println('FT took ${time.ticks()-t} ms')
|
||||
g.font_inited = true
|
||||
} else {
|
||||
if !exists {
|
||||
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.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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user