pub struct FontDeclaration {
pub path: PathBuf,
pub raster_size: u32,
pub filter: FontFilter,
pub rasterization: FontRasterization,
pub glyphs: Option<Vec<u32>>,
}Expand description
Named font declaration. This describes a resource; it does not load an atlas.
Fields§
§path: PathBufFont file, resolved relative to the manifest, independently of asset roots.
raster_size: u32Base rasterization size, 1..=512; default 32. DPI policy belongs to the font loader.
filter: FontFilterAtlas filtering; defaults to linear.
rasterization: FontRasterizationResolution policy; defaults to adaptive. Use fixed with nearest for pixel text.
glyphs: Option<Vec<u32>>Optional Unicode scalar values; omitted means the loader’s default coverage.
Trait Implementations§
Source§impl Clone for FontDeclaration
impl Clone for FontDeclaration
Source§impl Debug for FontDeclaration
impl Debug for FontDeclaration
Source§impl<'de> Deserialize<'de> for FontDeclaration
impl<'de> Deserialize<'de> for FontDeclaration
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 FontDeclaration
impl PartialEq for FontDeclaration
Source§impl Serialize for FontDeclaration
impl Serialize for FontDeclaration
impl StructuralPartialEq for FontDeclaration
Auto Trait Implementations§
impl Freeze for FontDeclaration
impl RefUnwindSafe for FontDeclaration
impl Send for FontDeclaration
impl Sync for FontDeclaration
impl Unpin for FontDeclaration
impl UnsafeUnpin for FontDeclaration
impl UnwindSafe for FontDeclaration
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