Documentation ¶
Index ¶
Constants ¶
View Source
const ( HelveticaName = StdFontName("\u0048e\u006c\u0076\u0065\u0074\u0069\u0063a") HelveticaBoldName = StdFontName("\u0048\u0065\u006c\u0076\u0065\u0074\u0069\u0063\u0061-\u0042\u006f\u006c\u0064") HelveticaObliqueName = StdFontName("\u0048\u0065\u006c\u0076\u0065\u0074\u0069\u0063\u0061\u002d\u004f\u0062l\u0069\u0071\u0075\u0065") HelveticaBoldObliqueName = StdFontName("H\u0065\u006c\u0076\u0065ti\u0063a\u002d\u0042\u006f\u006c\u0064O\u0062\u006c\u0069\u0071\u0075\u0065") )
View Source
const ( CourierName = StdFontName("\u0043o\u0075\u0072\u0069\u0065\u0072") CourierBoldName = StdFontName("\u0043\u006f\u0075r\u0069\u0065\u0072\u002d\u0042\u006f\u006c\u0064") CourierObliqueName = StdFontName("\u0043o\u0075r\u0069\u0065\u0072\u002d\u004f\u0062\u006c\u0069\u0071\u0075\u0065") CourierBoldObliqueName = StdFontName("\u0043\u006f\u0075\u0072ie\u0072\u002d\u0042\u006f\u006c\u0064\u004f\u0062\u006c\u0069\u0071\u0075\u0065") )
View Source
const ( SymbolName = StdFontName("\u0053\u0079\u006d\u0062\u006f\u006c") ZapfDingbatsName = StdFontName("\u005a\u0061\u0070f\u0044\u0069\u006e\u0067\u0062\u0061\u0074\u0073") )
View Source
const ( TimesRomanName = StdFontName("T\u0069\u006d\u0065\u0073\u002d\u0052\u006f\u006d\u0061\u006e") TimesBoldName = StdFontName("\u0054\u0069\u006d\u0065\u0073\u002d\u0042\u006f\u006c\u0064") TimesItalicName = StdFontName("\u0054\u0069\u006de\u0073\u002d\u0049\u0074\u0061\u006c\u0069\u0063") TimesBoldItalicName = StdFontName("\u0054\u0069m\u0065\u0073\u002dB\u006f\u006c\u0064\u0049\u0074\u0061\u006c\u0069\u0063") )
Variables ¶
This section is empty.
Functions ¶
func IsStdFont ¶
func IsStdFont(name StdFontName) bool
func RegisterStdFont ¶
func RegisterStdFont(name StdFontName, fnc func() StdFont, aliases ...StdFontName)
Types ¶
type CharMetrics ¶
func (CharMetrics) String ¶
func (_cd CharMetrics) String() string
type Descriptor ¶
type Font ¶
type Font interface { Encoder() _f.TextEncoder GetRuneMetrics(_ddd rune) (CharMetrics, bool) }
type FontWeight ¶
type FontWeight int
const ( FontWeightMedium FontWeight = iota FontWeightBold FontWeightRoman )
type RuneCharSafeMap ¶
type RuneCharSafeMap struct {
// contains filtered or unexported fields
}
func MakeRuneCharSafeMap ¶
func MakeRuneCharSafeMap(length int) *RuneCharSafeMap
func (*RuneCharSafeMap) Copy ¶
func (_ag *RuneCharSafeMap) Copy() *RuneCharSafeMap
func (*RuneCharSafeMap) Length ¶
func (_ec *RuneCharSafeMap) Length() int
func (*RuneCharSafeMap) Range ¶
func (_dg *RuneCharSafeMap) Range(f func(_af rune, _cdaa CharMetrics) (_dgf bool))
func (*RuneCharSafeMap) Read ¶
func (_eg *RuneCharSafeMap) Read(b rune) (CharMetrics, bool)
func (*RuneCharSafeMap) Write ¶
func (_gd *RuneCharSafeMap) Write(b rune, r CharMetrics)
type StdFont ¶
type StdFont struct {
// contains filtered or unexported fields
}
func NewStdFont ¶
func NewStdFont(desc Descriptor, metrics *RuneCharSafeMap) StdFont
func NewStdFontByName ¶
func NewStdFontByName(name StdFontName) (StdFont, bool)
func NewStdFontWithEncoding ¶
func NewStdFontWithEncoding(desc Descriptor, metrics *RuneCharSafeMap, encoder _f.TextEncoder) StdFont
func (StdFont) Descriptor ¶
func (_gde StdFont) Descriptor() Descriptor
func (StdFont) Encoder ¶
func (_egb StdFont) Encoder() _f.TextEncoder
func (StdFont) GetMetricsTable ¶
func (_cef StdFont) GetMetricsTable() *RuneCharSafeMap
func (StdFont) GetRuneMetrics ¶
func (_gc StdFont) GetRuneMetrics(r rune) (CharMetrics, bool)
func (StdFont) ToPdfObject ¶
type StdFontName ¶
type StdFontName string
type TtfType ¶
type TtfType struct { UnitsPerEm uint16 PostScriptName string Bold bool ItalicAngle float64 IsFixedPitch bool TypoAscender int16 TypoDescender int16 UnderlinePosition int16 UnderlineThickness int16 Xmin, Ymin, Xmax, Ymax int16 CapHeight int16 Widths []uint16 Chars map[rune]GID GlyphNames []GlyphName }
func TtfParseFile ¶
func (*TtfType) MakeEncoder ¶
func (_gaec *TtfType) MakeEncoder() (_f.SimpleEncoder, error)
func (*TtfType) MakeToUnicode ¶
func (*TtfType) NewEncoder ¶
func (_ccc *TtfType) NewEncoder() _f.TextEncoder
Click to show internal directories.
Click to hide internal directories.