Struct arcdps_imgui::FontGlyphRanges
source · pub struct FontGlyphRanges(/* private fields */);
Expand description
A set of 16-bit Unicode codepoints
Implementations§
source§impl FontGlyphRanges
impl FontGlyphRanges
sourcepub fn default() -> FontGlyphRanges
pub fn default() -> FontGlyphRanges
The default set of glyph ranges used by imgui.
sourcepub fn chinese_simplified_common() -> FontGlyphRanges
pub fn chinese_simplified_common() -> FontGlyphRanges
A set of glyph ranges appropriate for use with simplified common Chinese text.
sourcepub fn chinese_full() -> FontGlyphRanges
pub fn chinese_full() -> FontGlyphRanges
A set of glyph ranges appropriate for use with Chinese text.
sourcepub fn cyrillic() -> FontGlyphRanges
pub fn cyrillic() -> FontGlyphRanges
A set of glyph ranges appropriate for use with Cyrillic text.
sourcepub fn japanese() -> FontGlyphRanges
pub fn japanese() -> FontGlyphRanges
A set of glyph ranges appropriate for use with Japanese text.
sourcepub fn korean() -> FontGlyphRanges
pub fn korean() -> FontGlyphRanges
A set of glyph ranges appropriate for use with Korean text.
sourcepub fn thai() -> FontGlyphRanges
pub fn thai() -> FontGlyphRanges
A set of glyph ranges appropriate for use with Thai text.
sourcepub fn vietnamese() -> FontGlyphRanges
pub fn vietnamese() -> FontGlyphRanges
A set of glyph ranges appropriate for use with Vietnamese text.
sourcepub fn from_slice(slice: &'static [u16]) -> FontGlyphRanges
pub fn from_slice(slice: &'static [u16]) -> FontGlyphRanges
Creates a glyph range from a static slice. The expected format is a series of pairs of non-zero shorts, each representing an inclusive range of codepoints, followed by a single zero terminating the range. The ranges must not overlap.
As the slice is expected to last as long as a font is used, and is written into global
state, it must be 'static
.
§Panics
This function will panic if the given slice is not a valid font range.
sourcepub unsafe fn from_slice_unchecked(slice: &'static [u16]) -> FontGlyphRanges
pub unsafe fn from_slice_unchecked(slice: &'static [u16]) -> FontGlyphRanges
Creates a glyph range from a static slice without checking its validity.
See FontGlyphRanges::from_slice
for more information.
§Safety
It is up to the caller to guarantee the slice contents are valid.
sourcepub unsafe fn from_ptr(ptr: *const u16) -> FontGlyphRanges
pub unsafe fn from_ptr(ptr: *const u16) -> FontGlyphRanges
Creates a glyph range from a pointer, without checking its validity or enforcing its lifetime. The memory the pointer points to must be valid for as long as the font is in use.
§Safety
It is up to the caller to guarantee the pointer is not null, remains valid forever, and points to valid data.
Trait Implementations§
source§impl Clone for FontGlyphRanges
impl Clone for FontGlyphRanges
source§fn clone(&self) -> FontGlyphRanges
fn clone(&self) -> FontGlyphRanges
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FontGlyphRanges
impl Debug for FontGlyphRanges
source§impl PartialEq for FontGlyphRanges
impl PartialEq for FontGlyphRanges
source§fn eq(&self, other: &FontGlyphRanges) -> bool
fn eq(&self, other: &FontGlyphRanges) -> bool
self
and other
values to be equal, and is used
by ==
.