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

gg: fix x11 scaling

This commit is contained in:
Delyan Angelov
2020-06-04 21:09:46 +03:00
parent e7f52ebed6
commit 2237968ec1
2 changed files with 13 additions and 8 deletions

View File

@ -139,7 +139,7 @@ struct Game {
const ( fpath = os.resource_abs_path('../assets/fonts/RobotoMono-Regular.ttf') )
fn init_gui(mut game Game){
x := ft.new({ font_path: fpath, scale: 2 }) or {panic(err)}
x := ft.new({ font_path: fpath, scale: sapp.dpi_scale() }) or {panic(err)}
game.ft = x
game.font_loaded = true
}
@ -184,7 +184,6 @@ fn main() {
init_fn: init_gui
frame_fn: frame
event_fn: on_event
scale: 2
//wait_events: true
)
game.init_game()