Documentation ¶
Overview ¶
Package metrics provides font metrics.
Index ¶
- func CharWidth(fontName string, c int) int
- func FontBoundingBox(fontName string) types.Rectangle
- func FontNames() []string
- func FontSize(text, fontName string, width float64) int
- func TextWidth(text, fontName string, fontSize int) float64
- func UserSpaceFontBBox(fontName string, fontSize int) types.Rectangle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FontBoundingBox ¶
FontBoundingBox returns the font bounding box for a given font as specified in the corresponding AFM file.
func FontSize ¶
FontSize returns the needed font size (aka. font scaling factor) in points for rendering a given text string using a given font name with a given user space width.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.