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.
The attribute must be present for PDF/A. The only permissible predefined
name is Identity
, otherwise Self::cid_to_gid_map_stream
must be
used.
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.
The attribute must be present for PDF/A.
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.
sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.