bitmapfont

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package bitmapfont defines deterministic metrics shared by layout and raster.

Index

Constants

View Source
const (
	BaseWidth       = 6
	BaseHeight      = 13
	BaseAdvance     = 7
	BaseLineHeight  = 15
	TimestampSize   = 13
	TimestampLength = 16
	TimestampPad    = 4
)

Variables

This section is empty.

Functions

func GlyphCount

func GlyphCount(text []byte) int

func NextGlyph

func NextGlyph(text []byte, offset int) (rune, int)

func RunePixel

func RunePixel(value rune, x, y int, metrics Metrics) bool

func TimestampDimensions

func TimestampDimensions() (int, int)

func WrappedLines

func WrappedLines(text []byte, width int, size uint8) int

Types

type Metrics

type Metrics struct {
	Scale      int
	Width      int
	Height     int
	Advance    int
	LineHeight int
}

func ForSize

func ForSize(size uint8) Metrics

Jump to

Keyboard shortcuts

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