Module for font rendering. Unicode is supported, but only left to right.
Filtering constants
const (
filterNearest* = 0
filterLinear* = 1
)
opaque Font
type Font* = struct { _: ^struct{} }
fn load
fn load*(path: str, size: th.fu, filter: uint32 = filterLinear): Font {
fn Font.validate
fn (f: ^Font) validate*(): bool {
fn Font.draw
fn (f: ^Font) draw*(text: str, pos: th.Vf2, color: uint32, scale: th.fu = 1.0) {
fn Font.measure
fn (f: ^Font) measure*(text: str): th.Vf2 {