Versions in this module Expand all Collapse all v1 v1.2.0 Aug 8, 2023 v1.1.0 Aug 8, 2023 Changes in this version + const CourierBoldName + const CourierBoldObliqueName + const CourierName + const CourierObliqueName + const HelveticaBoldName + const HelveticaBoldObliqueName + const HelveticaName + const HelveticaObliqueName + const SymbolName + const TimesBoldItalicName + const TimesBoldName + const TimesItalicName + const TimesRomanName + const ZapfDingbatsName + func IsStdFont(name StdFontName) bool + func RegisterStdFont(name StdFontName, fnc func() StdFont, aliases ...StdFontName) + type CharMetrics struct + Wx float64 + Wy float64 + func (m CharMetrics) String() string + type Descriptor struct + Ascent float64 + BBox [4]float64 + CapHeight float64 + Descent float64 + Family string + Flags uint + ItalicAngle float64 + Name StdFontName + StemH float64 + StemV float64 + Weight FontWeight + XHeight float64 + type Font interface + Encoder func() textencoding.TextEncoder + GetRuneMetrics func(r rune) (CharMetrics, bool) + type FontWeight int + const FontWeightBold + const FontWeightMedium + const FontWeightRoman + type GID = textencoding.GID + type GlyphName = textencoding.GlyphName + type StdFont struct + func NewStdFont(desc Descriptor, metrics map[rune]CharMetrics) StdFont + func NewStdFontByName(name StdFontName) (StdFont, bool) + func NewStdFontWithEncoding(desc Descriptor, metrics map[rune]CharMetrics, ...) StdFont + func (font StdFont) Descriptor() Descriptor + func (font StdFont) Encoder() textencoding.TextEncoder + func (font StdFont) GetMetricsTable() map[rune]CharMetrics + func (font StdFont) GetRuneMetrics(r rune) (CharMetrics, bool) + func (font StdFont) Name() string + func (font StdFont) ToPdfObject() core.PdfObject + type StdFontName string + type TtfType struct + Bold bool + CapHeight int16 + Chars map[rune]GID + GlyphNames []GlyphName + IsFixedPitch bool + ItalicAngle float64 + PostScriptName string + TypoAscender int16 + TypoDescender int16 + UnderlinePosition int16 + UnderlineThickness int16 + UnitsPerEm uint16 + Widths []uint16 + Xmax int16 + Xmin int16 + Ymax int16 + Ymin int16 + func NewFontFile2FromPdfObject(obj core.PdfObject) (TtfType, error) + func TtfParse(r io.ReadSeeker) (TtfType, error) + func TtfParseFile(fileStr string) (TtfType, error) + func (ttf *TtfType) MakeEncoder() (textencoding.SimpleEncoder, error) + func (ttf *TtfType) MakeToUnicode() *cmap.CMap + func (ttf *TtfType) NewEncoder() textencoding.TextEncoder + func (ttf *TtfType) String() string