Пример #1
0
func LoadTTFFont(fname string, size, flags int) *Font {
	cfname := C.CString(fname)
	defer C.free(unsafe.Pointer(cfname))

	var f *Font

	f = (*Font)(C.al_load_ttf_font(cfname, C.int(size), C.int(flags)))

	return f
}
Пример #2
0
func LoadFont(filename string, size, flags int32) *font.Font {
	f := C.CString(filename)
	defer C.free(unsafe.Pointer(f))
	return (*font.Font)(unsafe.Pointer(C.al_load_ttf_font(f, C.int(size), C.int(flags))))
}