fonts

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package fonts handles font definitions within gxs.

Index

Constants

View Source
const (
	// EmptyFontValue is returned when a font doesn't have a character defined.
	EmptyFontValue = ""
)

Variables

This section is empty.

Functions

func DefaultFont

func DefaultFont() (string, error)

DefaultFont will get the default font, erroring if none is found

func Names

func Names() []string

Names are the list of gxs names

Types

type Font

type Font struct {
	Name   string
	Height int
	Width  int
	// contains filtered or unexported fields
}

Font represents a gxs defined font

func NewFont

func NewFont(name string) (*Font, error)

NewFont creates a new font mapper

func (*Font) Get

func (f *Font) Get(i int) string

Get returns the string gxs pattern for a specified ascii input int

type FontMapper

type FontMapper struct {
	Open func() (map[int]string, error)
	Font Font
}

FontMapper is an underlying mapper

type MapperFunc

type MapperFunc func() (map[int]string, error)

MapperFunc is how fonts are resolved for mappings

Directories

Path Synopsis
Package main generates fonts
Package main generates fonts

Jump to

Keyboard shortcuts

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