machinery

package
v0.0.0-...-7aa18cb Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package machinery contains all necessary functions for generating a SDF PBF

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithFontPath

func WithFontPath(path string) func(*FontMachinery)

func WithFontSize

func WithFontSize(fontSize float64) func(*FontMachinery)

Types

type FontMachinery

type FontMachinery struct {
	FontPath string
	// contains filtered or unexported fields
}

func NewFontMachinery

func NewFontMachinery(opts ...func(*FontMachinery)) *FontMachinery

NewFontMachinery creates a new FontMachinery

func (*FontMachinery) ComposeByFontNames

func (fm *FontMachinery) ComposeByFontNames(fontNames []string, min, max int) ([]byte, error)

ComposeByFontNames loads and generates a PBF of given font names

func (*FontMachinery) ComposeByFonts

func (fm *FontMachinery) ComposeByFonts(fonts []*truetype.Font, min, max int) ([]byte, error)

ComposeByFonts generates a PBF of given truetype fonts

func (*FontMachinery) ComposeFontstack

func (fm *FontMachinery) ComposeFontstack(fontStack, fontRange string) ([]byte, error)

ComposeFontstack loads and generates a PBF of given fontstack

func (*FontMachinery) GetAvailableFonts

func (fm *FontMachinery) GetAvailableFonts()

GetAvailableFonts returns a list of available fonts

func (*FontMachinery) ScanFontDirectory

func (fm *FontMachinery) ScanFontDirectory()

ScanFontDirectory scans the given font directory to find all fonts

Jump to

Keyboard shortcuts

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