Documentation
¶
Overview ¶
Package bitedbuild is the backing library for bited-build.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DUnit = Unit{ SrcForm: SrcForm{SrcT}, OutDir: "out", XForm: XForm{XFormT}, VecSuffix: " Vec", OTBSuffix: "", DFONTSuffix: "", PCFSuffix: " PCF", SFNTLang: "English (US)", }
DUnit specifies default values for Unit.
View Source
var SrcT = template.Must(template.New("").Parse("src/{{ .Name }}.bdf"))
SrcT is the default value for Unit SrcForm.
View Source
var XFormT = template.Must(template.New("").Parse("{{ .Name }}{{ .X }}x"))
XFormT is the default value for Unit XForm.
Functions ¶
This section is empty.
Types ¶
type SrcForm ¶
SrcForm is a wrapper type to enable koanf to unmarshal strings into template.Template for Unit SrcForm.
func (*SrcForm) UnmarshalText ¶
type SrcFormPat ¶
type SrcFormPat struct {
// Name is the font's family name.
Name string
}
A SrcFormPat specifies fields passed to Unit SrcForm templates.
type Unit ¶
type Unit struct {
// Src is the processed path to the source bited BDF.
// Derived from SrcForm.
Src string `koanf:"-"`
// Nerd determines whether to compile Nerd Fonts variants.
Nerd bool `koanf:"-"`
// TTF is the path to the output TTF.
TTF string `koanf:"-"`
// TTFix is a processed string of custom Python code to be injected when
// building via Fontforge.
// Derived from TTFixPre.
TTFix string `koanf:"-"`
// Xs is a processed list of integer scales to build.
// Derived from XsPre.
Xs []int `koanf:"-"`
// FontSize is the base font size of the font.
FontSize int `koanf:"-"`
// Widths maps glyph names defined in Src to glyph widths.
Widths map[string]int `koanf:"-"`
// Name is the font's family name.
Name string `koanf:"name"`
// SrcForm is the template for Src.
SrcForm SrcForm `koanf:"src"`
// OutDir is the output directory for generated images.
OutDir string `koanf:"out_dir"`
// VecSuffix is the suffix for vector format names.
VecSuffix string `koanf:"vec_suffix"`
// OTBSuffix is the suffix for OTB format names.
OTBSuffix string `koanf:"otb_suffix"`
// DFONTSuffix is the suffix for DFONT format names.
DFONTSuffix string `koanf:"dfont_suffix"`
// PCFSuffix is the template for PCF format names.
PCFSuffix string `koanf:"pcf_suffix"`
// Xs is an unprocessed list of integer scales to build.
XsPre []int `koanf:"xs"`
// XForm is the template for each scaled font's name.
XForm XForm `koanf:"x_format"`
// SFNTLang is the language to use for SFNT table data.
SFNTLang string `koanf:"sfnt_lang"`
// TTFix is an unprocessed string of custom Python code to be injected when
// building via Fontforge.
TTFixPre string `koanf:"ttfix"`
// SFNT represents user-defined key-value pairings for the font's SFNT table.
SFNT map[string]string `koanf:"sfnt"`
}
A Unit holds the data necessary to build a single font.
type XForm ¶
XForm is a wrapper type to enable koanf to unmarshal strings into template.Template for Unit XForm.
func (*XForm) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.