pub struct Type1Font<'a> { /* private fields */ }
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>>

The number of written pairs.

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).

Write a sequence of pairs with primitive values.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Start writing the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.