Struct pdf_writer::writers::CidFont
source · pub struct CidFont<'a> { /* private fields */ }
Expand description
Writer for a CID font dictionary. PDF 1.2+.
This struct is created by Chunk::cid_font
.
Implementations§
source§impl<'a> CidFont<'a>
impl<'a> CidFont<'a>
sourcepub fn subtype(&mut self, subtype: CidFontType) -> &mut Self
pub fn subtype(&mut self, subtype: CidFontType) -> &mut Self
Write the /Subtype
attribute. Required.
sourcepub fn base_font(&mut self, name: Name<'_>) -> &mut Self
pub fn base_font(&mut self, name: Name<'_>) -> &mut Self
Write the /BaseFont
attribute. Required.
sourcepub fn system_info(&mut self, info: SystemInfo<'_>) -> &mut Self
pub fn system_info(&mut self, info: SystemInfo<'_>) -> &mut Self
Write the /CIDSystemInfo
dictionary. Required.
sourcepub fn font_descriptor(&mut self, id: Ref) -> &mut Self
pub fn font_descriptor(&mut self, id: Ref) -> &mut Self
Write the /FontDescriptor
attribute. Required.
sourcepub fn default_width(&mut self, width: f32) -> &mut Self
pub fn default_width(&mut self, width: f32) -> &mut Self
Write the /DW
attribute, specifying the default glyph width.
sourcepub fn cid_to_gid_map_predefined(&mut self, name: Name<'_>) -> &mut Self
pub fn cid_to_gid_map_predefined(&mut self, name: Name<'_>) -> &mut Self
Write the /CIDToGIDMap
attribute as a predefined name.
sourcepub fn cid_to_gid_map_stream(&mut self, stream: Ref) -> &mut Self
pub fn cid_to_gid_map_stream(&mut self, stream: Ref) -> &mut Self
Write the /CIDToGIDMap
attribute as a reference to a stream, whose
bytes directly map from CIDs to glyph indices.
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 CidFont<'a>
impl<'a> RefUnwindSafe for CidFont<'a>
impl<'a> Send for CidFont<'a>
impl<'a> Sync for CidFont<'a>
impl<'a> Unpin for CidFont<'a>
impl<'a> !UnwindSafe for CidFont<'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