font

package
v0.0.0-...-6f71fe9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FUnitsToFloat64

func FUnitsToFloat64(x fixed.Int26_6) float64

Types

type Font

type Font interface {
	Name() string
	Size() float64
	Family() draw2d.FontFamily
	Style() draw2d.FontStyle
	FontData() draw2d.FontData
	Extents() draw2dimg.FontExtents
	// WithSize returns this Font but with the specified size
	WithSize(float64) Font
	// WithStyle returns this Font but with the specified style
	WithStyle(draw2d.FontStyle) Font
	// WithFamily returns this F|ont but with the specified family
	WithFamily(draw2d.FontFamily) Font
	// Set the font in a GraphicContext
	Set(*draw2dimg.GraphicContext)
	StringLength(s string) float64
}

func New

func New(name string, size float64, family draw2d.FontFamily, style draw2d.FontStyle) Font

func ParseFont

func ParseFont(s string) (Font, error)

Jump to

Keyboard shortcuts

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