font

package
v0.0.0-...-0518d83 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAlias

func AddAlias(font *Font, name string)

Types

type Font

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

func GetFont

func GetFont(name string) *Font

func LoadFont

func LoadFont(reader io.Reader) *Font

func LoadTextureFont

func LoadTextureFont(path, name string, minR, maxR rune, atlas *texture.TextureAtlas) *Font

func LoadTextureFontMap

func LoadTextureFontMap(path, name string, chars map[string]rune, atlas *texture.TextureAtlas) *Font

func LoadTextureFontMap2

func LoadTextureFontMap2(chars map[rune]*texture.TextureRegion, overlap float64) *Font

func (*Font) Draw

func (font *Font) Draw(renderer *batch.QuadBatch, x, y, size float64, text string)

func (*Font) DrawBg

func (font *Font) DrawBg(v bool)

func (*Font) DrawMonospaced

func (font *Font) DrawMonospaced(renderer *batch.QuadBatch, x, y, size float64, text string)

func (*Font) DrawOrigin

func (font *Font) DrawOrigin(renderer *batch.QuadBatch, x, y float64, origin vector.Vector2d, size float64, monospaced bool, text string)

func (*Font) DrawOriginRotation

func (font *Font) DrawOriginRotation(renderer *batch.QuadBatch, x, y float64, origin vector.Vector2d, size, rotation float64, monospaced bool, text string)

func (*Font) DrawOriginRotationColor

func (font *Font) DrawOriginRotationColor(renderer *batch.QuadBatch, x, y float64, origin vector.Vector2d, size, rotation float64, monospaced bool, color color2.Color, text string)

func (*Font) DrawOriginRotationColorV

func (font *Font) DrawOriginRotationColorV(renderer *batch.QuadBatch, position vector.Vector2d, origin vector.Vector2d, size, rotation float64, monospaced bool, color color2.Color, text string)

func (*Font) DrawOriginRotationV

func (font *Font) DrawOriginRotationV(renderer *batch.QuadBatch, position vector.Vector2d, origin vector.Vector2d, size, rotation float64, monospaced bool, text string)

func (*Font) DrawOriginV

func (font *Font) DrawOriginV(renderer *batch.QuadBatch, position vector.Vector2d, origin vector.Vector2d, size float64, monospaced bool, text string)

func (*Font) GetAscent

func (font *Font) GetAscent() float64

func (*Font) GetSize

func (font *Font) GetSize() float64

func (*Font) GetWidth

func (font *Font) GetWidth(size float64, text string) float64

func (*Font) GetWidthMonospaced

func (font *Font) GetWidthMonospaced(size float64, text string) float64

func (*Font) SetBgBorderSize

func (font *Font) SetBgBorderSize(size float64)

func (*Font) SetBgColor

func (font *Font) SetBgColor(color color2.Color)

Jump to

Keyboard shortcuts

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