copied only changes
This commit is contained in:
parent
83d871a38f
commit
a490f10c86
1 changed files with 12 additions and 0 deletions
|
@ -63,6 +63,18 @@ func LoadFontEx(fileName string, fontSize int32, fontChars []rune) Font {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LoadFontEx - Load Font from file with extended parameter - number of runes to load
|
||||||
|
func LoadFontExByRunesNumber(fileName string, fontSize int32, runesNumber int32) Font {
|
||||||
|
ccharsCount := (C.int)(runesNumber)
|
||||||
|
cfileName := C.CString(fileName)
|
||||||
|
defer C.free(unsafe.Pointer(cfileName))
|
||||||
|
cfontSize := (C.int)(fontSize)
|
||||||
|
|
||||||
|
ret := C.LoadFontEx(cfileName, cfontSize, nil, ccharsCount)
|
||||||
|
v := newFontFromPointer(unsafe.Pointer(&ret))
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
// LoadFontFromImage - Loads an Image font file (XNA style)
|
// LoadFontFromImage - Loads an Image font file (XNA style)
|
||||||
func LoadFontFromImage(image Image, key color.RGBA, firstChar int32) Font {
|
func LoadFontFromImage(image Image, key color.RGBA, firstChar int32) Font {
|
||||||
cimage := image.cptr()
|
cimage := image.cptr()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue