font

package
v0.0.0-...-ac5580a Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteLine

func WriteLine(text string, ft BitmapFont, spacing int, d embed.FS) *image.RGBA

Types

type BitmapFont

type BitmapFont struct {
	Font  string `json:"font"`
	Chars []Char `json:"chars"`
}

func ReadFont

func ReadFont(filename string, d embed.FS) BitmapFont

type Char

type Char struct {
	Name  string `json:"name"`
	PosX  int    `json:"posX"`
	PosY  int    `json:"posY"`
	SizeX int    `json:"sizeX"`
	SizeY int    `json:"sizeY"`
}

func FindChar

func FindChar(char string, font BitmapFont) (Char, int)

Jump to

Keyboard shortcuts

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