mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gg: always use stb_truetype for now
This commit is contained in:
parent
f1fdafcdff
commit
db2346069a
1
thirdparty/fontstash/fontstash.h
vendored
1
thirdparty/fontstash/fontstash.h
vendored
@ -172,6 +172,7 @@ FONS_DEF void fonsDrawDebug(FONScontext* s, float x, float y);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef FONS_USE_FREETYPE
|
||||
|
||||
#ifdef FONS_USE_FREETYPE
|
||||
|
||||
|
@ -215,6 +215,9 @@ pub fn (ctx &Context) draw_empty_rect(x, y, w, h f32, c gx.Color) {
|
||||
sgl.end()
|
||||
}
|
||||
|
||||
pub fn (ctx &Context) draw_circle(x, y, r f32, c gx.Color) {
|
||||
}
|
||||
|
||||
pub fn create_image(file string) u32 {
|
||||
// println('gg create image "$file"')
|
||||
if !os.exists(file) {
|
||||
|
@ -51,7 +51,8 @@ pub fn (ctx &Context) draw_text(x, y int, text string, cfg gx.TextCfg) {
|
||||
}
|
||||
ctx.ft.fons.set_font(ctx.ft.font_normal)
|
||||
scale := if ctx.ft.scale == 0 { f32(1) } else { ctx.ft.scale }
|
||||
ctx.ft.fons.set_size(scale * f32(cfg.size))
|
||||
size := if cfg.size == 0 { gg.default_font_size } else { cfg.size }
|
||||
ctx.ft.fons.set_size(scale * f32(size))
|
||||
if cfg.align == gx.align_right {
|
||||
C.fonsSetAlign(ctx.ft.fons, C.FONS_ALIGN_RIGHT | C.FONS_ALIGN_TOP)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user