pub struct FontDescriptorOverride<'a> { /* private fields */ }
Expand description
Writer for a font descriptor override dictionary.
This struct is created by FontDescriptor::descriptor_override
.
The font descriptor dictionaries within can only contain metrics data.
Implementations§
source§impl FontDescriptorOverride<'_>
impl FontDescriptorOverride<'_>
sourcepub fn custom_class(&mut self, class: Name<'_>) -> FontDescriptor<'_>
pub fn custom_class(&mut self, class: Name<'_>) -> FontDescriptor<'_>
Start writing a FontDescriptor
dictionary for a custom character
class.
sourcepub fn custom_class_ref(&mut self, class: Name<'_>, id: Ref) -> &mut Self
pub fn custom_class_ref(&mut self, class: Name<'_>, id: Ref) -> &mut Self
Write a class override referencing a FontDescriptor
dictionary
indirectly.
sourcepub fn cjk_class(&mut self, class: CjkClass) -> FontDescriptor<'_>
pub fn cjk_class(&mut self, class: CjkClass) -> FontDescriptor<'_>
Start writing a FontDescriptor
dictionary for a predefined CJK class.
sourcepub fn cjk_class_ref(&mut self, class: CjkClass, id: Ref) -> &mut Self
pub fn cjk_class_ref(&mut self, class: CjkClass, id: Ref) -> &mut Self
Write a class override for a predefined CJK class referencing a
FontDescriptor
dictionary indirectly.
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.
Trait Implementations§
source§impl<'a> Deref for FontDescriptorOverride<'a>
impl<'a> Deref for FontDescriptorOverride<'a>
source§impl<'a> DerefMut for FontDescriptorOverride<'a>
impl<'a> DerefMut for FontDescriptorOverride<'a>
source§impl<'a, 'any> Rewrite<'a> for FontDescriptorOverride<'any>
impl<'a, 'any> Rewrite<'a> for FontDescriptorOverride<'any>
source§type Output = FontDescriptorOverride<'a>
type Output = FontDescriptorOverride<'a>
The writer with the rewritten lifetime.
Auto Trait Implementations§
impl<'a> Freeze for FontDescriptorOverride<'a>
impl<'a> RefUnwindSafe for FontDescriptorOverride<'a>
impl<'a> Send for FontDescriptorOverride<'a>
impl<'a> Sync for FontDescriptorOverride<'a>
impl<'a> Unpin for FontDescriptorOverride<'a>
impl<'a> !UnwindSafe for FontDescriptorOverride<'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