Struct fonterator::FontChain
source · pub struct FontChain<'a> { /* private fields */ }
Expand description
A FontChain is a collection of fonts that together should cover all of the unicode codepoints.
Implementations
sourceimpl<'a> FontChain<'a>
impl<'a> FontChain<'a>
sourcepub fn add<B: Into<SharedBytes<'a>>>(self, bytes: B) -> Result<Self, Error>
pub fn add<B: Into<SharedBytes<'a>>>(self, bytes: B) -> Result<Self, Error>
Add a Font or FontCollection to the FontChain
sourcepub fn render<T: ToString>(
&self,
text: T,
xy: (f32, f32),
wh: (f32, f32)
) -> PathIterator<'_> ⓘ
pub fn render<T: ToString>(
&self,
text: T,
xy: (f32, f32),
wh: (f32, f32)
) -> PathIterator<'_> ⓘ
Render a string.
sourcepub fn multilingual_mono(self, index: usize) -> Self
pub fn multilingual_mono(self, index: usize) -> Self
Enable Multi-Lingual Monospace (2 Latin Letters per CJK Character).
The index refers to which font to get the CJK character width from, so it should be a font with CJK support (otherwise it won’t work).
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for FontChain<'a>
impl<'a> Send for FontChain<'a>
impl<'a> Sync for FontChain<'a>
impl<'a> Unpin for FontChain<'a>
impl<'a> UnwindSafe for FontChain<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more