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

new gg/freetype modules with sokol/fontstash backends

This commit is contained in:
Alexander Medvednikov
2020-01-21 03:22:18 +01:00
parent 43ba6766ba
commit 0502a54a36
15 changed files with 321 additions and 20 deletions

View File

@ -52,7 +52,7 @@ fn init(user_data voidptr) {
})
s := &C.sgl_desc_t{}
C.sgl_setup(s)
state.fons = C.sfons_create(512, 512, 1)
state.fons = sfons.create(512, 512, 1)
// or use DroidSerif-Regular.ttf
if bytes := os.read_bytes(os.resource_abs_path('assets/ProggyTiny.ttf')) {
println('loaded font: $bytes.len')