Struct pdf_writer::writers::Type0Font
source · pub struct Type0Font<'a> { /* private fields */ }
Expand description
Writer for a Type-0 (composite) font dictionary. PDF 1.2+.
This struct is created by Chunk::type0_font
.
Implementations§
source§impl<'a> Type0Font<'a>
impl<'a> Type0Font<'a>
sourcepub fn base_font(&mut self, name: Name<'_>) -> &mut Self
pub fn base_font(&mut self, name: Name<'_>) -> &mut Self
Write the /BaseFont
attribute. This is the PostScript name of the
font. Required.
sourcepub fn encoding_predefined(&mut self, encoding: Name<'_>) -> &mut Self
pub fn encoding_predefined(&mut self, encoding: Name<'_>) -> &mut Self
Write the /Encoding
attribute as a predefined encoding. Either this or
encoding_cmap
is required.
sourcepub fn encoding_cmap(&mut self, cmap: Ref) -> &mut Self
pub fn encoding_cmap(&mut self, cmap: Ref) -> &mut Self
Write the /Encoding
attribute as a reference to a character map.
Either this or encoding_predefined
is
required.
sourcepub fn descendant_font(&mut self, cid_font: Ref) -> &mut Self
pub fn descendant_font(&mut self, cid_font: Ref) -> &mut Self
Write the /DescendantFonts
attribute as a one-element array containing
a reference to a CidFont
. Required.
sourcepub fn to_unicode(&mut self, cmap: Ref) -> &mut Self
pub fn to_unicode(&mut self, cmap: Ref) -> &mut Self
Write the /ToUnicode
attribute.
A suitable character map can be built with UnicodeCmap
.
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Type0Font<'a>
impl<'a> RefUnwindSafe for Type0Font<'a>
impl<'a> Send for Type0Font<'a>
impl<'a> Sync for Type0Font<'a>
impl<'a> Unpin for Type0Font<'a>
impl<'a> !UnwindSafe for Type0Font<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more