Documentation ¶
Index ¶
- func GetError() error
- func Init() error
- func Quit()
- func RenderUTF8Blended(font *Font, text string, fg sdl.Color) (*sdl.Surface, error)
- func WasInit() bool
- type Destroyable
- 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) FaceStyleName() string
- func (f *Font) Faces() int
- func (f *Font) GlyphIsProvided(glyph rune) int
- func (f *Font) GlyphMetrics(glyph rune) (minX, maxX, minY, maxY, advance int, err error)
- func (f *Font) Height() int
- func (f *Font) Hinting() FontHinting
- func (f *Font) Kerning() int
- func (f *Font) LineSkip() int
- func (f *Font) Outline() int
- func (f *Font) SizeText(text string) (w, h int, err error)
- func (f *Font) SizeUTF8(text string) (w, h int, err error)
- func (f *Font) SizeUnicode(text string) (w, h int, err error)
- func (f *Font) Style() FontStyle
- func (f *Font) WithHinting(hinting FontHinting)
- func (f *Font) WithKerning(kerning int)
- func (f *Font) WithOutline(outline int)
- func (f *Font) WithStyle(style FontStyle)
- type FontHinting
- type FontStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderUTF8Blended ¶
Types ¶
type Destroyable ¶
type Destroyable interface {
Destroy()
}
type Font ¶
type Font C.struct_TTF_Font
func (*Font) FaceFamilyName ¶
func (*Font) FaceIsFixedWidth ¶
func (*Font) FaceStyleName ¶
func (*Font) GlyphIsProvided ¶
func (*Font) GlyphMetrics ¶
func (*Font) Hinting ¶
func (f *Font) Hinting() FontHinting
func (*Font) WithHinting ¶
func (f *Font) WithHinting(hinting FontHinting)
func (*Font) WithKerning ¶
func (*Font) WithOutline ¶
type FontHinting ¶
type FontHinting int
const ( HintingNormal FontHinting = C.TTF_HINTING_NORMAL HintingLight FontHinting = C.TTF_HINTING_LIGHT HintingMono FontHinting = C.TTF_HINTING_MONO HintingNone FontHinting = C.TTF_HINTING_NONE )
type FontStyle ¶
type FontStyle int
const ( StyleNormal FontStyle = C.TTF_STYLE_NORMAL StyleBold FontStyle = C.TTF_STYLE_BOLD StyleItalic FontStyle = C.TTF_STYLE_ITALIC StyleUnderline FontStyle = C.TTF_STYLE_UNDERLINE StyleStrikethrough FontStyle = C.TTF_STYLE_STRIKETHROUGH )
Click to show internal directories.
Click to hide internal directories.