ttf: binded TTF_FontFaceStyleName in sdl_ttf.go
Binded TTF_FontFaceStyleName to FaceStyleName() on the Font struct.
Note: TTF_FontFaceStyleName was not supported until SDL_ttf 2.0.4.
@@ -349,6 +349,14 @@ func (f *Font) FaceFamilyName() string {
return fname
}
+// FaceStyleName returns the current font face family's style name from the loaded font.
+// (https://wiki.libsdl.org/SDL_ttf/TTF_FontFaceStyleName)
+func (f *Font) FaceStyleName() string {
+ _fname := C.TTF_FontFaceStyleName(f.f)
+ fname := C.GoString(_fname)
+ return fname
+}
+
// GlyphMetrics contains glyph-specific rendering metrics.
type GlyphMetrics struct {
MinX, MaxX int
