pub struct FontEditorState {Show 20 fields
pub fonts: Vec<FontAsset>,
pub selected_font: Option<u64>,
pub selected_glyph: Option<u32>,
pub active_tab: FontEditorTab,
pub preview_text: String,
pub preview_size: f32,
pub preview_style: FontStyle,
pub preview_color: Vec4,
pub preview_background: Vec4,
pub layout_settings: TextLayoutSettings,
pub show_baseline: bool,
pub show_ascender: bool,
pub show_descender: bool,
pub show_cap_height: bool,
pub show_x_height: bool,
pub show_advance: bool,
pub show_bearings: bool,
pub atlas_zoom: f32,
pub search_query: String,
pub unicode_page: u32,
}Fields§
§fonts: Vec<FontAsset>§selected_font: Option<u64>§selected_glyph: Option<u32>§active_tab: FontEditorTab§preview_text: String§preview_size: f32§preview_style: FontStyle§preview_color: Vec4§preview_background: Vec4§layout_settings: TextLayoutSettings§show_baseline: bool§show_ascender: bool§show_descender: bool§show_cap_height: bool§show_x_height: bool§show_advance: bool§show_bearings: bool§atlas_zoom: f32§search_query: String§unicode_page: u32Implementations§
Source§impl FontEditorState
impl FontEditorState
pub fn new() -> Self
pub fn selected_font(&self) -> Option<&FontAsset>
pub fn compute_preview_layout(&self) -> Option<TextLayoutResult>
pub fn selected_glyph_metrics(&self) -> Option<&GlyphMetrics>
pub fn atlas_utilization(&self) -> f32
Trait Implementations§
Source§impl Clone for FontEditorState
impl Clone for FontEditorState
Auto Trait Implementations§
impl Freeze for FontEditorState
impl RefUnwindSafe for FontEditorState
impl Send for FontEditorState
impl Sync for FontEditorState
impl Unpin for FontEditorState
impl UnsafeUnpin for FontEditorState
impl UnwindSafe for FontEditorState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.