text

package
v0.0.0-...-dbc7887 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package text has text styles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Face

func Face(ttf []byte, dpi float32, sizePt int) font.Face

Face returns a font.Face for a TTF of a given size at a given DPI.

Types

type Style

type Style struct {
	// FG and BG are the foreground and background colors of the text.
	FG, BG color.Color
	// Face is the font face, describing the font and size.
	font.Face
}

A Style describes the color, font, and size of text.

func (Style) Merge

func (sty Style) Merge(other Style) Style

Merge returns other with any nil fields replaced by the corresponding field of sty.

Jump to

Keyboard shortcuts

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