pub struct ShapeRequestBuilder<'a> { /* private fields */ }Expand description
Builder for ShapeRequest.
Implementations§
Source§impl<'a> ShapeRequestBuilder<'a>
impl<'a> ShapeRequestBuilder<'a>
Sourcepub fn direction(self, d: ShapeDirection) -> Self
pub fn direction(self, d: ShapeDirection) -> Self
Sets the shaping direction.
Sourcepub fn script(self, tag: [u8; 4]) -> Self
pub fn script(self, tag: [u8; 4]) -> Self
Pins the OpenType script tag (overrides swash’s auto-detection).
Sourcepub fn language(self, tag: [u8; 4]) -> Self
pub fn language(self, tag: [u8; 4]) -> Self
Pins the OpenType language tag for language-specific GSUB/GPOS rules.
Sourcepub fn feature(self, f: ShapeFeature) -> Self
pub fn feature(self, f: ShapeFeature) -> Self
Appends an OpenType feature override.
Sourcepub fn build(self) -> Result<ShapeRequest<'a>, ShapeRequestError>
pub fn build(self) -> Result<ShapeRequest<'a>, ShapeRequestError>
Builds the ShapeRequest.
§Errors
Returns ShapeRequestError::MissingText or
ShapeRequestError::MissingFont if the respective fields were not
provided.
Trait Implementations§
Source§impl<'a> Debug for ShapeRequestBuilder<'a>
impl<'a> Debug for ShapeRequestBuilder<'a>
Source§impl<'a> Default for ShapeRequestBuilder<'a>
impl<'a> Default for ShapeRequestBuilder<'a>
Source§fn default() -> ShapeRequestBuilder<'a>
fn default() -> ShapeRequestBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for ShapeRequestBuilder<'a>
impl<'a> RefUnwindSafe for ShapeRequestBuilder<'a>
impl<'a> Send for ShapeRequestBuilder<'a>
impl<'a> Sync for ShapeRequestBuilder<'a>
impl<'a> Unpin for ShapeRequestBuilder<'a>
impl<'a> UnsafeUnpin for ShapeRequestBuilder<'a>
impl<'a> UnwindSafe for ShapeRequestBuilder<'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