text

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package text provides advance and kerning metrics for the base-14 fonts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Advance

func Advance(r rune) float64

Advance returns the glyph advance in thousandths of an em, or 500 if it is unknown.

func AdvanceBold

func AdvanceBold(r rune) float64

AdvanceBold returns the bold glyph advance, or 500 if it is unknown.

func Kern

func Kern(a, b rune) float64

Kern returns the adjustment between adjacent glyphs in thousandths of an em. Negative values move glyphs closer together. Values come from Adobe Helvetica's phvr8a.afm KPX pairs.

func Measure

func Measure(s string, size float64) float64

Measure sums glyph advances and kerning, then scales the result to points.

func MeasureBold

func MeasureBold(s string, size float64) float64

MeasureBold sums Helvetica-Bold advances and scales the result to points.

func Supports

func Supports(r rune) bool

Supports reports whether Helvetica/WinAnsi can represent the rune.

func WinAnsiByte

func WinAnsiByte(r rune) (byte, bool)

WinAnsiByte maps a rune to its WinAnsi byte and reports whether it is representable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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