Documentation ¶
Overview ¶
Package builtin implements support for the 14 built-in PDF fonts.
Index ¶
- Constants
- Variables
- func Afm(fontName string) (*afm.Info, error)
- func Embed(w pdf.Putter, fontName string, resName pdf.Name) (font.Embedded, error)
- func EmbedAfm(w pdf.Putter, afm *afm.Info, resName pdf.Name) (font.Embedded, error)
- func Font(fontName string) (font.Font, error)
- func FontAfm(afm *afm.Info) (font.Font, error)
Constants ¶
View Source
const ( Courier = "Courier" CourierBold = "Courier-Bold" CourierBoldOblique = "Courier-BoldOblique" CourierOblique = "Courier-Oblique" Helvetica = "Helvetica" HelveticaBold = "Helvetica-Bold" HelveticaBoldOblique = "Helvetica-BoldOblique" HelveticaOblique = "Helvetica-Oblique" TimesRoman = "Times-Roman" TimesBold = "Times-Bold" TimesBoldItalic = "Times-BoldItalic" TimesItalic = "Times-Italic" Symbol = "Symbol" ZapfDingbats = "ZapfDingbats" )
The names of the 14 built-in PDF fonts. These are the valid arguments for the Afm() function.
Variables ¶
View Source
var FontNames = []string{ Courier, CourierBold, CourierBoldOblique, CourierOblique, Helvetica, HelveticaBold, HelveticaBoldOblique, HelveticaOblique, TimesRoman, TimesBold, TimesBoldItalic, TimesItalic, Symbol, ZapfDingbats, }
FontNames contains the names of the 14 built-in PDF fonts.
Functions ¶
func Afm ¶
Afm returns the font metrics for one of the built-in pdf fonts. FontName must be one of the names listed in FontNames.
func Embed ¶
Embed loads one of the 14 builtin fonts and embeds it into a PDF file. The valid font names are given in FontNames.
func EmbedAfm ¶
EmbedAfm loads a simple Type 1 font described by `afm` and embeds it into a PDF file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.