font

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(png []byte) ([]byte, error)

Load loads font-sheet (png image) and converts it to font data. Image must be 128x128. Each char is 8x8. Char 0 is in the top-left corner. Char 1 to the right.

This function can be used if you want to use 3rd font:

myFont := pi.Font{Width:4, SpecialWidth:8, Height: 8} pi.Load(png, myFont.Data[:])

Color with index 0 is treated as background. Any other color as foreground.

The result is inserted into fontData slice. The size of slice must be 2048.

Types

This section is empty.

Jump to

Keyboard shortcuts

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