1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/gg/text_rendering.v
2022-01-04 12:21:12 +03:00

36 lines
647 B
V

// Copyright (c) 2019-2022 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license that can be found in the LICENSE file.
module gg
import gx
enum FontVariant {
normal = 0
bold
mono
italic
}
struct FTConfig {
font_path string
custom_bold_font_path string
scale f32 = 1.0
font_size int
bytes_normal []byte
bytes_bold []byte
bytes_mono []byte
bytes_italic []byte
}
struct StringToRender {
x int
y int
text string
cfg gx.TextCfg
}
[if debug_font ?]
fn debug_font_println(s string) {
println(s)
}