font

package
v0.0.0-...-ec6453d Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PtI = fixed.I

Functions

func PtToF

func PtToF(pt Pt) float64

Types

type Face

type Face struct {
	*Manager
	font.Face
	Add float64
}

func (*Face) Extra

func (f *Face) Extra() float64

func (*Face) Rune

func (f *Face) Rune(r, last rune) float64

func (*Face) Text

func (f *Face) Text(text string, last rune) (res float64, _ rune)

type Key

type Key struct {
	Name string
	Size float64
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(dpi, subx, suby int) *Manager

func (*Manager) DPI

func (m *Manager) DPI() float64

func (*Manager) DotToPt

func (m *Manager) DotToPt(dot float64) Pt

func (*Manager) Err

func (m *Manager) Err() error

func (*Manager) Face

func (m *Manager) Face(name string, size float64) (font.Face, error)

func (*Manager) Path

func (m *Manager) Path(name string) (string, error)

func (*Manager) PtToDot

func (m *Manager) PtToDot(pt Pt) float64

func (*Manager) RegisterTTF

func (m *Manager) RegisterTTF(name string, path string) *Manager

TODO add font style for bold and italic fonts and use inline styling

func (*Manager) SubPixels

func (m *Manager) SubPixels() (x, y int)

type Pt

type Pt = fixed.Int26_6

func PtF

func PtF(f float64) Pt

type Src

type Src struct {
	*truetype.Font
	Path string
}

Jump to

Keyboard shortcuts

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