ttf

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2017 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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)

Types

type Font

type Font struct {
	// contains filtered or unexported fields
}

func OpenFontIndex

func OpenFontIndex(file string, size int, index int) (*Font, error)

OpenFontIndex (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_16.html#SEC16)

func OpenFontIndexRW

func OpenFontIndexRW(src *sdl.RWops, freesrc, size, index int) (*Font, error)

OpenFontIndexRW (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_17.html#SEC17)

func OpenFontRW

func OpenFontRW(src *sdl.RWops, freesrc, size int) (*Font, error)

OpenFontRW (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_15.html#SEC15)

func (*Font) FaceFamilyName

func (f *Font) FaceFamilyName() string

FaceFamilyName (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_35.html#SEC35)

func (*Font) FaceIsFixedWidth

func (f *Font) FaceIsFixedWidth() bool

FaceIsFixedWidth (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_34.html#SEC34)

func (*Font) RenderUTF8_Blended

func (f *Font) RenderUTF8_Blended(text string, color sdl.Color) (*sdl.Surface, error)

RenderUTF8_Blended (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_52.html#SEC52)

func (*Font) RenderUTF8_Blended_Wrapped

func (f *Font) RenderUTF8_Blended_Wrapped(text string, fg sdl.Color, wrapLength int) (*sdl.Surface, error)

func (*Font) RenderUTF8_Shaded

func (f *Font) RenderUTF8_Shaded(text string, fg, bg sdl.Color) (*sdl.Surface, error)

RenderUTF8_Shaded (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_48.html#SEC48)

func (*Font) RenderUTF8_Solid

func (f *Font) RenderUTF8_Solid(text string, color sdl.Color) (*sdl.Surface, error)

RenderUTF8_Solid (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_44.html#SEC44)

func (*Font) SetHinting

func (f *Font) SetHinting(hinting int)

SetHinting (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_26.html#SEC26)

func (*Font) SetKerning

func (f *Font) SetKerning(allowed bool)

SetKerning (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_28.html#SEC28)

func (*Font) SetOutline

func (f *Font) SetOutline(outline int)

SetOutline (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_24.html#SEC24)

func (*Font) SetStyle

func (f *Font) SetStyle(style int)

SetStyle (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_22.html#SEC22)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL