// Returns the style name of the font's currently selected face, // or a blank string if unavailable. func (f *Font) StyleName() string { if f == nil { return "nil" } p := C.TTF_FontFaceStyleName(f.cfont) if p == nil { return "" } s := C.GoString(p) return s }
// Returns the style name of the font's currently selected face, // or a blank string if unavailable. func (f *Font) StyleName() string { var s string if f != nil { p := C.TTF_FontFaceStyleName(f.cfont) if p != nil { s = C.GoString(p) } else { s = "" } } else { s = "nil" } return s }
// Returns the style name of the font's currently selected face, // or a blank string if unavailable. func (f *Font) StyleName() string { var s string if f != nil { f.mutex.RLock() p := C.TTF_FontFaceStyleName(f.cfont) if p != nil { s = C.GoString(p) } else { s = "" } f.mutex.RUnlock() } else { s = "nil" } return s }
// Font face stylename func TTFFontFaceStyleName(font *C.TTF_Font) string { return C.GoString(C.TTF_FontFaceStyleName(font)) }
func (f *Font) FaceStyleName() string { return C.GoString(C.TTF_FontFaceStyleName(f.c)) }