Struct pdf_writer::writers::Type1Font [−][src]
pub struct Type1Font<'a> { /* fields omitted */ }
Expand description
Writer for a Type-1 font dictionary.
This struct is created by PdfWriter::type1_font
.
Implementations
Write the /Name
attribute, which is the name of the font in the
current resource dictionary. Required in PDF 1.0, discouraged in PDF
1.1+.
Write the /BaseFont
attribute. This is the PostScript name of the
font. Required.
Write the FirstChar
attribute, defining the first character code in
the font’s widths array. Required (except for standard 14 fonts
before PDF 1.5).
Write the LastChar
attribute, defining the last character code in the
font’s widths array. Required (except for standard 14 fonts before
PDF 1.5).
Write the /Widths
array. Should be of length last - first + 1
.
Required (except for standard 14 fonts before PDF 1.5).
Write the /FontDescriptor
attribute. Required (except for standard 14
fonts before PDF 1.5).
Write the /Encoding
attribute as a predefined encoding. Either this or
encoding_custom
is required.
Start writing an /Encoding
dictionary. Either this or
encoding_predefined
is required.
Write the /ToUnicode
attribute. PDF 1.2+.
A suitable character map can be built with UnicodeCmap
.
Methods from Deref<Target = Dict<'a>>
Start writing a pair with an arbitrary value.
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.