Skip to content

sokol.sfons #

fn create #

fn create(width int, height int, flags int) &fontstash.Context

create a new Context/font atlas, for rendering glyphs, given its dimensions width and height

fn destroy #

fn destroy(ctx &fontstash.Context)

fn flush #

fn flush(ctx &fontstash.Context)

fn rgba #

fn rgba(r u8, g u8, b u8, a u8) u32

struct C.sfons_allocator_t #

struct C.sfons_allocator_t {
pub:
	alloc_fn  memory.FnAllocatorAlloc = unsafe { nil }
	free_fn   memory.FnAllocatorFree  = unsafe { nil }
	user_data voidptr
}

struct C.sfons_desc_t #

struct C.sfons_desc_t {
pub:
	width     int // initial width of font atlas texture (default: 512, must be power of 2)
	height    int // initial height of font atlas texture (default: 512, must be power of 2)
	allocator C.sfons_allocator_t // optional memory allocation overrides
}