pub struct RenderProfile {
pub id: String,
pub version: u32,
pub glyphs: BTreeMap<String, GlyphInfo>,
}Expand description
A serializable render profile.
This is the data you ship and version-control. The engine (or any consumer)
loads it to create a GlyphRegistry.
Fields§
§id: String§version: u32§glyphs: BTreeMap<String, GlyphInfo>Implementations§
Source§impl RenderProfile
impl RenderProfile
pub fn empty(id: impl Into<String>, version: u32) -> Self
Sourcepub fn bbsstalgia_xtermjs_unicode11_example() -> Self
pub fn bbsstalgia_xtermjs_unicode11_example() -> Self
Built-in example profile tuned for BBSstalgia + xterm.js.
This is intentionally small and exists to provide a safe starting point. Real deployments should version-control their own profile JSON.
The returned profile matches testdata/profile_example.json.
Source§impl RenderProfile
impl RenderProfile
Sourcepub fn set_width(&mut self, glyph: impl Into<String>, width: u8)
pub fn set_width(&mut self, glyph: impl Into<String>, width: u8)
Set or replace the width policy for a glyph/grapheme.
Sourcepub fn merge_glyphs_from(&mut self, other: &RenderProfile)
pub fn merge_glyphs_from(&mut self, other: &RenderProfile)
Merge another profile’s glyph table into this one (other wins on conflicts).
This is intentionally a simple data operation. Profile identity/versioning is left to the caller.
Trait Implementations§
Source§impl Clone for RenderProfile
impl Clone for RenderProfile
Source§fn clone(&self) -> RenderProfile
fn clone(&self) -> RenderProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RenderProfile
impl Debug for RenderProfile
Source§impl<'de> Deserialize<'de> for RenderProfile
impl<'de> Deserialize<'de> for RenderProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RenderProfile
impl PartialEq for RenderProfile
Source§impl Serialize for RenderProfile
impl Serialize for RenderProfile
impl Eq for RenderProfile
impl StructuralPartialEq for RenderProfile
Auto Trait Implementations§
impl Freeze for RenderProfile
impl RefUnwindSafe for RenderProfile
impl Send for RenderProfile
impl Sync for RenderProfile
impl Unpin for RenderProfile
impl UnsafeUnpin for RenderProfile
impl UnwindSafe for RenderProfile
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