MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / get_default

Method get_default

src/renderer.rs:156–158  ·  view source on GitHub ↗

Get the default font (set via [`load_default`](FontManager::load_default)). Returns `None` if no default font has been set.

(&self)

Source from the content-addressed store, hash-verified

154 /// Get the default font (set via [`load_default`](FontManager::load_default)).
155 /// Returns `None` if no default font has been set.
156 pub fn get_default(&self) -> Option<&Font> {
157 self.default_font.as_ref().map(|d| &d.font)
158 }
159
160 fn metrics(&mut self, font_size: u16, font_asset: Option<&'static FontAsset>) -> FontMetrics {
161 let font_ptr = font_asset.map_or(0usize, |a| a as *const _ as usize);

Callers 2

renderFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected