Documentation ¶
Index ¶
- Constants
- func ByteSwappedUnicode(swap bool)
- func GetError() error
- func Init() error
- func Quit()
- func SetError(err string)
- func WasInit() bool
- type Font
- func (f *Font) Ascent() int
- func (f *Font) Close()
- func (f *Font) Descent() int
- func (f *Font) FaceFamilyName() string
- func (f *Font) FaceIsFixedWidth() bool
- func (f *Font) Faces() int
- func (f *Font) GetHinting() int
- func (f *Font) GetKerning() bool
- func (f *Font) GetOutline() int
- func (f *Font) GetStyle() int
- func (f *Font) Height() int
- func (f *Font) LineSkip() int
- func (f *Font) RenderUTF8_Blended(text string, color sdl.Color) (*sdl.Surface, error)
- func (f *Font) RenderUTF8_Blended_Wrapped(text string, fg sdl.Color, wrapLength int) (*sdl.Surface, error)
- func (f *Font) RenderUTF8_Shaded(text string, fg, bg sdl.Color) (*sdl.Surface, error)
- func (f *Font) RenderUTF8_Solid(text string, color sdl.Color) (*sdl.Surface, error)
- func (f *Font) SetHinting(hinting int)
- func (f *Font) SetKerning(allowed bool)
- func (f *Font) SetOutline(outline int)
- func (f *Font) SetStyle(style int)
- func (f *Font) SizeUTF8(text string) (int, int, error)
Constants ¶
const ( HINTING_NORMAL = int(C.TTF_HINTING_NORMAL) HINTING_LIGHT = int(C.TTF_HINTING_LIGHT) HINTING_MONO = int(C.TTF_HINTING_MONO) HINTING_NONE = int(C.TTF_HINTING_NONE) )
Font Hinting Types
const ( STYLE_NORMAL = 0 STYLE_BOLD = 0x01 STYLE_ITALIC = 0x02 STYLE_UNDERLINE = 0x04 STYLE_STRIKETHROUGH = 0x08 )
Font Style Types
Variables ¶
This section is empty.
Functions ¶
func ByteSwappedUnicode ¶
func ByteSwappedUnicode(swap bool)
ByteSwappedUnicode (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_20.html#SEC20)
func GetError ¶
func GetError() error
GetError (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_12.html#SEC12)
func Init ¶
func Init() error
Init (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_8.html#SEC8)
func SetError ¶
func SetError(err string)
SetError (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_11.html#SEC11)
func WasInit ¶
func WasInit() bool
WasInit (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_9.html#SEC9)
Types ¶
type Font ¶
type Font struct {
// contains filtered or unexported fields
}
func OpenFontIndex ¶
OpenFontIndex (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_16.html#SEC16)
func OpenFontIndexRW ¶
OpenFontIndexRW (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_17.html#SEC17)
func OpenFontRW ¶
OpenFontRW (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_15.html#SEC15)
func (*Font) Ascent ¶
Ascent (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_30.html#SEC30)
func (*Font) Close ¶
func (f *Font) Close()
Close (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_18.html#SEC18)
func (*Font) Descent ¶
Descent (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_31.html#SEC31)
func (*Font) FaceFamilyName ¶
FaceFamilyName (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_35.html#SEC35)
func (*Font) FaceIsFixedWidth ¶
FaceIsFixedWidth (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_34.html#SEC34)
func (*Font) Faces ¶
Faces (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_33.html#SEC33)
func (*Font) GetHinting ¶
GetHinting (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_25.html#SEC25)
func (*Font) GetKerning ¶
GetKerning (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_27.html#SEC27)
func (*Font) GetOutline ¶
GetOutline (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_23.html#SEC23)
func (*Font) GetStyle ¶
GetStyle (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_21.html#SEC21)
func (*Font) Height ¶
Height (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_29.html#SEC29)
func (*Font) LineSkip ¶
LineSkip (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_32.html#SEC32)
func (*Font) RenderUTF8_Blended ¶
RenderUTF8_Blended (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_52.html#SEC52)
func (*Font) RenderUTF8_Blended_Wrapped ¶
func (*Font) RenderUTF8_Shaded ¶
RenderUTF8_Shaded (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_48.html#SEC48)
func (*Font) RenderUTF8_Solid ¶
RenderUTF8_Solid (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_44.html#SEC44)
func (*Font) SetHinting ¶
SetHinting (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_26.html#SEC26)
func (*Font) SetKerning ¶
SetKerning (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_28.html#SEC28)
func (*Font) SetOutline ¶
SetOutline (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_24.html#SEC24)
func (*Font) SetStyle ¶
SetStyle (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_22.html#SEC22)