pub struct DrawSettings<'a> { /* private fields */ }
Implementations§
source§impl<'a> DrawSettings<'a>
impl<'a> DrawSettings<'a>
sourcepub fn unhinted(size: Size, location: impl Into<LocationRef<'a>>) -> Self
pub fn unhinted(size: Size, location: impl Into<LocationRef<'a>>) -> Self
Creates settings for an unhinted draw operation with the given size and location in variation space.
sourcepub fn hinted(instance: &'a HintingInstance, is_pedantic: bool) -> Self
pub fn hinted(instance: &'a HintingInstance, is_pedantic: bool) -> Self
Creates settings for a hinted draw operation using hinting data contained in the font.
If is_pedantic
is true then any error that occurs during hinting will
cause drawing to fail. This is equivalent to the FT_LOAD_PEDANTIC
flag
in FreeType.
The font size, location in variation space and hinting mode are defined by the current configuration of the given hinting instance.
sourcepub fn with_memory(self, memory: Option<&'a mut [u8]>) -> Self
pub fn with_memory(self, memory: Option<&'a mut [u8]>) -> Self
Builder method to associate a user memory buffer to be used for temporary allocations during drawing.
The required size of this buffer can be computed using the
OutlineGlyph::draw_memory_size
method.
If not provided, any necessary memory will be allocated internally.
sourcepub fn with_path_style(self, path_style: PathStyle) -> Self
pub fn with_path_style(self, path_style: PathStyle) -> Self
Builder method to control nuances of glyf
pointstream interpretation.
Meant for use when trying to match legacy code behavior in Rust.