bitmapfont

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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