v/vlib/gg/text_rendering.v

29 lines
585 B
V
Raw Normal View History

2022-01-04 10:21:08 +01:00
// Copyright (c) 2019-2022 Alexander Medvednikov. All rights reserved.
2020-07-06 20:29:05 +02:00
// Use of this source code is governed by an MIT license that can be found in the LICENSE file.
module gg
2020-06-02 15:35:37 +02:00
import gx
2020-06-02 15:35:37 +02:00
2020-07-06 21:40:24 +02:00
struct FTConfig {
font_path string
2020-12-01 16:30:22 +01:00
custom_bold_font_path string
scale f32 = 1.0
font_size int
2022-04-15 14:35:35 +02:00
bytes_normal []u8
bytes_bold []u8
bytes_mono []u8
bytes_italic []u8
2020-06-02 15:35:37 +02:00
}
2021-01-23 10:25:40 +01:00
struct StringToRender {
x int
y int
text string
cfg gx.TextCfg
}
[if debug_font ?]
fn debug_font_println(s string) {
println(s)
}