freetype

package
v0.0.0-...-689a6dd Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Face

type Face struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Face Represents a font face

func NewFace

func NewFace(l *Library, fontBytes []byte, idx int) (*Face, error)

NewFace Creates a new font face

func (*Face) Done

func (f *Face) Done() error

Done Done

func (*Face) Glyph

func (f *Face) Glyph(ch rune) (*image.RGBA, *Metrics, error)

Glyph Gets the glyph as an image

func (*Face) Pt

func (f *Face) Pt(pt, dpi int) error

Pt Changes the size (in points)

type Library

type Library struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Library Represents a library

func NewLibrary

func NewLibrary() (*Library, error)

NewLibrary Creates a new library

func (*Library) Done

func (l *Library) Done() error

Done Done

type Metrics

type Metrics struct {
	Width              int
	Height             int
	HorizontalBearingX int
	HorizontalBearingY int
	AdvanceWidth       int
	VerticalBearingX   int
	VerticalBearingY   int
	AdvanceHeight      int
}

Metrics Represents the glyph metrics

Jump to

Keyboard shortcuts

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