ttf

package
v0.0.0-...-9a9b71d Latest Latest
Warning

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

Go to latest
Published: May 16, 2014 License: Zlib Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MAJOR_VERSION = C.SDL_TTF_MAJOR_VERSION
	MINOR_VERSION = C.SDL_TTF_MINOR_VERSION
	PATCHLEVEL    = C.SDL_TTF_PATCHLEVEL
)
View Source
const (
	UNICODE_BOM_NATIVE  = C.UNICODE_BOM_NATIVE
	UNICODE_BOM_SWAPPED = C.UNICODE_BOM_SWAPPED
)
View Source
const (
	STYLE_NORMAL        = C.TTF_STYLE_NORMAL
	STYLE_BOLD          = C.TTF_STYLE_BOLD
	STYLE_ITALIC        = C.TTF_STYLE_ITALIC
	STYLE_UNDERLINE     = C.TTF_STYLE_UNDERLINE
	STYLE_STRIKETHROUGH = C.TTF_STYLE_STRIKETHROUGH
)
View Source
const (
	HINTING_NORMAL = C.TTF_HINTING_NORMAL
	HINTING_LIGHT  = C.TTF_HINTING_LIGHT
	HINTING_MONO   = C.TTF_HINTING_MONO
	HINTING_NONE   = C.TTF_HINTING_NONE
)

Variables

This section is empty.

Functions

func ByteSwappedUnicode

func ByteSwappedUnicode(swapped int)

func Init

func Init() error

func Linked_Version

func Linked_Version() *sdl.Version

func Quit

func Quit()

func VERSION

func VERSION() *sdl.Version

func WasInit

func WasInit() int

Types

type Font

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

func OpenFont

func OpenFont(file string, ptsize int) (*Font, error)

func OpenFontIndex

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

func (*Font) Ascent

func (f *Font) Ascent() int

func (*Font) Close

func (f *Font) Close()

func (*Font) Descent

func (f *Font) Descent() int

func (*Font) FaceFamilyName

func (f *Font) FaceFamilyName() string

func (*Font) FaceIsFixedWidth

func (f *Font) FaceIsFixedWidth() int

func (*Font) FaceStyleName

func (f *Font) FaceStyleName() string

func (*Font) Faces

func (f *Font) Faces() int64

func (*Font) GetHinting

func (f *Font) GetHinting() int

func (*Font) GetKerning

func (f *Font) GetKerning() int

func (*Font) GetOutline

func (f *Font) GetOutline() int

func (*Font) GetStyle

func (f *Font) GetStyle() int

func (*Font) GlyphIsProvided

func (f *Font) GlyphIsProvided(ch uint16) int

func (*Font) GlyphMetrics

func (f *Font) GlyphMetrics(ch uint16) (int, int, int, int, int, error)

func (*Font) Height

func (f *Font) Height() int

func (*Font) LineSkip

func (f *Font) LineSkip() int

func (*Font) RenderTextSolid

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

func (*Font) RenderUTF8Solid

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

func (*Font) SetHinting

func (f *Font) SetHinting(hinting int)

func (*Font) SetKerning

func (f *Font) SetKerning(kerning int)

func (*Font) SetOutline

func (f *Font) SetOutline(outline int)

func (*Font) SetStyle

func (f *Font) SetStyle(style int)

func (*Font) SizeText

func (f *Font) SizeText(text string) (int, int, error)

func (*Font) SizeUTF8

func (f *Font) SizeUTF8(text string) (int, int, error)

Jump to

Keyboard shortcuts

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