pub struct FontWriter<'a, 'n: 'a> { /* private fields */ }
Expand description
Writer for a font struct.
Created by XmpWriter::fonts
.
Implementations§
source§impl<'a, 'n: 'a> FontWriter<'a, 'n>
impl<'a, 'n: 'a> FontWriter<'a, 'n>
sourcepub fn child_font_files<'b>(
&mut self,
files: impl IntoIterator<Item = &'b str>,
) -> &mut Self
pub fn child_font_files<'b>( &mut self, files: impl IntoIterator<Item = &'b str>, ) -> &mut Self
Write the stFnt:childFontFiles
property.
An array of font files that make up this font.
sourcepub fn composite(&mut self, composite: bool) -> &mut Self
pub fn composite(&mut self, composite: bool) -> &mut Self
Write the stFnt:composite
property.
Whether the font is a composite font.
sourcepub fn font_face(&mut self, face: &str) -> &mut Self
pub fn font_face(&mut self, face: &str) -> &mut Self
Write the stFnt:fontFace
property.
The font face name.
sourcepub fn font_family(&mut self, family: &str) -> &mut Self
pub fn font_family(&mut self, family: &str) -> &mut Self
Write the stFnt:fontFamily
property.
The font family name.
sourcepub fn font_file(&mut self, file_name: &str) -> &mut Self
pub fn font_file(&mut self, file_name: &str) -> &mut Self
Write the stFnt:fontFile
property.
The font file name.
sourcepub fn font_name(&mut self, name: &str) -> &mut Self
pub fn font_name(&mut self, name: &str) -> &mut Self
Write the stFnt:fontName
property.
The PostScript name of the font.
sourcepub fn font_type(&mut self, font_type: FontType<'_>) -> &mut Self
pub fn font_type(&mut self, font_type: FontType<'_>) -> &mut Self
Write the stFnt:fontType
property.
The font type.
sourcepub fn version_string(&mut self, version: &str) -> &mut Self
pub fn version_string(&mut self, version: &str) -> &mut Self
Write the stFnt:versionString
property.
The version string of the font. Must be chosen depending on the font type.
- Type 1:
/version
- TrueType / OpenType:
nameId 5
- CID:
/CIDFontVersion
- Bitmap Font: must be empty
Methods from Deref<Target = Struct<'a, 'n>>§
sourcepub fn element(
&mut self,
name: &'a str,
namespace: Namespace<'n>,
) -> Element<'_, 'n>
pub fn element( &mut self, name: &'a str, namespace: Namespace<'n>, ) -> Element<'_, 'n>
Start writing a property in the struct.
sourcepub fn element_with_attrs<'b>(
&mut self,
name: &'a str,
namespace: Namespace<'n>,
attrs: impl IntoIterator<Item = (&'b str, &'b str)>,
) -> Element<'_, 'n>
pub fn element_with_attrs<'b>( &mut self, name: &'a str, namespace: Namespace<'n>, attrs: impl IntoIterator<Item = (&'b str, &'b str)>, ) -> Element<'_, 'n>
Start writing a property with attributes in the struct.
Trait Implementations§
source§impl<'a, 'n> Deref for FontWriter<'a, 'n>
impl<'a, 'n> Deref for FontWriter<'a, 'n>
Auto Trait Implementations§
impl<'a, 'n> Freeze for FontWriter<'a, 'n>
impl<'a, 'n> RefUnwindSafe for FontWriter<'a, 'n>
impl<'a, 'n> Send for FontWriter<'a, 'n>
impl<'a, 'n> Sync for FontWriter<'a, 'n>
impl<'a, 'n> Unpin for FontWriter<'a, 'n>
impl<'a, 'n> !UnwindSafe for FontWriter<'a, 'n>
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