// Returns the family name of the font's currently selected face, // or a blank string if unavailable. func (f *Font) FamilyName() string { if f == nil { return "nil" } p := C.TTF_FontFaceFamilyName(f.cfont) if p == nil { return "" } s := C.GoString(p) return s }
// Returns the family name of the font's currently selected face, // or a blank string if unavailable. func (f *Font) FamilyName() string { var s string if f != nil { p := C.TTF_FontFaceFamilyName(f.cfont) if p != nil { s = C.GoString(p) } else { s = "" } } else { s = "nil" } return s }
// Returns the family name of the font's currently selected face, // or a blank string if unavailable. func (f *Font) FamilyName() string { var s string if f != nil { f.mutex.RLock() p := C.TTF_FontFaceFamilyName(f.cfont) if p != nil { s = C.GoString(p) } else { s = "" } f.mutex.RUnlock() } else { s = "nil" } return s }
// FaceFamilyName (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_35.html#SEC35) func (f *Font) FaceFamilyName() string { _fname := C.TTF_FontFaceFamilyName(f.f) fname := C.GoString(_fname) return fname }
func (f *Font) FaceFamilyName() string { _fname := C.TTF_FontFaceFamilyName(f.f) fname := C.GoString(_fname) C.free(unsafe.Pointer(_fname)) return fname }
// Font family name func TTFFontFamilyName(font *C.TTF_Font) string { return C.GoString(C.TTF_FontFaceFamilyName(font)) }
func (f *Font) FaceFamilyName() string { return C.GoString(C.TTF_FontFaceFamilyName(f.c)) }