textsize

package
v0.0.0-...-e2e6f4c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Limit

func Limit(s string, maxwidth int, suffix string) string

Limit the number of characters in a string based on a variable width font. Does not take line wrapping into account.

Types

type Estimate

type Estimate struct {
	Width   float64
	Unknown int
}

func EstimateWidth

func EstimateWidth(s string) (ts Estimate)

Jump to

Keyboard shortcuts

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