truetype

package
v0.0.0-...-90d5324 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 5 Imported by: 3

Documentation

Overview

Package truetype draws a textual message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Font

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

Font is a Truetype font loaded and ready for use.

func Open

func Open(ttfPath string) (*Font, error)

Open loads a Truetype font file into memory.

func (*Font) Text

func (f *Font) Text(dst draw.Image, text string, opts ...Option) error

Text renders a text onto an image.

TODO: support multiple lines

type Option

type Option option

Option is a text rendering option that influences the output.

func Foreground

func Foreground(c color.Color) Option

Foreground sets the text foreground color.

Jump to

Keyboard shortcuts

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