pub struct AtlasChars { /* private fields */ }Expand description
The characters an atlas keeps, of those its font has: every one of
ATLAS_RANGES, every character the game’s text uses, and the glyphs
the project requires; never a combining mark or a control character.
Its wide sets keep the characters of the languages that draw from them
(wants_wide). AtlasChars::default is the
ranges alone.
Implementations§
Source§impl AtlasChars
impl AtlasChars
Sourcepub fn of_lang(lang: &Lang, required: &str) -> Self
pub fn of_lang(lang: &Lang, required: &str) -> Self
The ranges, every character of lang’s text (Lang::texts) and
the glyphs of required.
Sourcepub fn with_wide(self, wide: &str) -> Self
pub fn with_wide(self, wide: &str) -> Self
The same characters, and the glyphs of wide kept from the
unnamed wide font whatever the text uses (a name entry’s letters).
Sourcepub fn with_wide_set(self, set: Option<&str>, wide: &str) -> Self
pub fn with_wide_set(self, set: Option<&str>, wide: &str) -> Self
The same characters, and the glyphs of wide kept from the wide
font of set set (None: the unnamed one) whatever the text uses.
Sourcepub fn wants_wide(
&self,
c: char,
narrow: &BitmapFont,
set: Option<&str>,
) -> bool
pub fn wants_wide( &self, c: char, narrow: &BitmapFont, set: Option<&str>, ) -> bool
Whether the atlas keeps c in the wide set set (None: the
unnamed one), if its font has it: a character the text of the
languages drawing from that set uses, or one of the project’s wide
glyphs for it, that the narrow fonts (narrow) don’t have; or
punctuation those languages have wide.
Trait Implementations§
Source§impl Clone for AtlasChars
impl Clone for AtlasChars
Source§fn clone(&self) -> AtlasChars
fn clone(&self) -> AtlasChars
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AtlasChars
impl Debug for AtlasChars
Source§impl Default for AtlasChars
impl Default for AtlasChars
Source§fn default() -> AtlasChars
fn default() -> AtlasChars
impl Eq for AtlasChars
Source§impl PartialEq for AtlasChars
impl PartialEq for AtlasChars
impl StructuralPartialEq for AtlasChars
Auto Trait Implementations§
impl Freeze for AtlasChars
impl RefUnwindSafe for AtlasChars
impl Send for AtlasChars
impl Sync for AtlasChars
impl Unpin for AtlasChars
impl UnsafeUnpin for AtlasChars
impl UnwindSafe for AtlasChars
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.