// Sets the rendering style of the font. func (f *Font) SetStyle(style int) { sdl.GlobalMutex.Lock() f.mutex.Lock() C.TTF_SetFontStyle(f.cfont, C.int(style)) f.mutex.Unlock() sdl.GlobalMutex.Unlock() }
func (f *Font) SetStyle(_bold bool, _italic bool, _underline bool) { var flags int if _bold { flags |= C.TTF_STYLE_BOLD } if _italic { flags |= C.TTF_STYLE_ITALIC } if _underline { flags |= C.TTF_STYLE_UNDERLINE } if flags == 0 { flags = C.TTF_STYLE_NORMAL } C.TTF_SetFontStyle(f.Get(), C.int(flags)) }
// SetStyle (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_22.html#SEC22) func (f *Font) SetStyle(style int) { C.TTF_SetFontStyle(f.f, C.int(style)) }
func (this Font) SetStyle(style FontStyle) { c_font := (*C.TTF_Font)(this.Ptr) c_style := C.int(style) C.TTF_SetFontStyle(c_font, c_style) }
// Set the style of the font func TTFSetFontStyle(font *C.TTF_Font, style int) { C.TTF_SetFontStyle(font, C.int(style)) }