Documentation
¶
Overview ¶
Package type3 implements Type 3 fonts embedded into PDF files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Font ¶ added in v0.3.5
type Font struct {
// Glyphs is a list of glyphs in the font.
// An empty glyph without a name must be included at index 0,
// to replace the ".notdef" glyph.
Glyphs []*Glyph
// Resources (optional) holds named resources shared by all glyph content
// streams that don't have their own resource dictionary. This is embedded
// in the Type 3 font dictionary.
Resources *content.Resources
// FontMatrix transforms glyph space units to text space units.
FontMatrix matrix.Matrix
// PostScriptName (optional) is the PostScript name of the font.
PostScriptName string
// FontFamily (optional) is the name of the font family.
FontFamily string
// FontStretch (optional) is the font stretch value.
FontStretch os2.Width
// FontWeight (optional) is the font weight value.
FontWeight os2.Weight
IsFixedPitch bool
IsSerif bool
IsScript bool
IsAllCap bool
IsSmallCap bool
ItalicAngle float64
Ascent float64 // Type 3 glyph space units
Descent float64 // Type 3 glyph space units
Leading float64 // Type 3 glyph space units
CapHeight float64 // Type 3 glyph space units
XHeight float64 // Type 3 glyph space units
UnderlinePosition float64
UnderlineThickness float64
}
Font represents a Type 3 font with user-defined glyph procedures.
type Glyph ¶
type Glyph struct {
// Name is the PostScript name of the glyph.
Name string
// Content is the glyph's content stream.
// It must start with either the d0 or d1 operator.
// Use [content/builder.Builder] to construct content streams.
Content content.Stream
// Resources (optional) holds named resources used by this glyph's content
// stream. If set, the resources are embedded in the glyph's stream
// dictionary. If nil, resources are looked up from the font's resource
// dictionary or inherited from the page.
Resources *content.Resources
}
Glyph represents a single glyph in a Type 3 font.
Click to show internal directories.
Click to hide internal directories.