pub struct UnicodeCmap<G = u16> { /* private fields */ }
Expand description
A builder for a /ToUnicode
character map stream.
Implementations§
source§impl<G> UnicodeCmap<G>where
G: GlyphId,
impl<G> UnicodeCmap<G>where
G: GlyphId,
sourcepub fn new(name: Name<'_>, info: SystemInfo<'_>) -> Self
pub fn new(name: Name<'_>, info: SystemInfo<'_>) -> Self
Create a new, empty unicode character map for a horizontal writing mode font.
sourcepub fn with_writing_mode(
name: Name<'_>,
info: SystemInfo<'_>,
mode: WMode,
) -> Self
pub fn with_writing_mode( name: Name<'_>, info: SystemInfo<'_>, mode: WMode, ) -> Self
Create a new, empty unicode character map while specifying the writing mode.
sourcepub fn pair(&mut self, glyph: G, codepoint: char)
pub fn pair(&mut self, glyph: G, codepoint: char)
Add a mapping from a glyph ID to a codepoint.
sourcepub fn pair_with_multiple(
&mut self,
glyph: G,
codepoints: impl IntoIterator<Item = char>,
)
pub fn pair_with_multiple( &mut self, glyph: G, codepoints: impl IntoIterator<Item = char>, )
Add a mapping from a glyph ID to multiple codepoints.
Auto Trait Implementations§
impl<G> Freeze for UnicodeCmap<G>
impl<G> RefUnwindSafe for UnicodeCmap<G>where
G: RefUnwindSafe,
impl<G> Send for UnicodeCmap<G>where
G: Send,
impl<G> Sync for UnicodeCmap<G>where
G: Sync,
impl<G> Unpin for UnicodeCmap<G>where
G: Unpin,
impl<G> UnwindSafe for UnicodeCmap<G>where
G: UnwindSafe,
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