pub struct FontConfig {
pub family: String,
pub size: f32,
}Expand description
字体配置:族名 + 逻辑像素字号。
注意:字号是全局的——文本引擎只用一个字号,
不支持同一文档内不同字号(富文本)。若将来需要富文本,
再给 TextStyle 加 font_size 字段并让 measure_text 读它。
Fields§
§family: String字体族名(DirectWrite family name),例如 "NSimSun" / "JetBrains Mono"。
size: f32字号(逻辑像素)。
Implementations§
Source§impl FontConfig
impl FontConfig
Trait Implementations§
Source§impl Clone for FontConfig
impl Clone for FontConfig
Source§impl Debug for FontConfig
impl Debug for FontConfig
Source§impl Default for FontConfig
impl Default for FontConfig
Source§impl PartialEq for FontConfig
impl PartialEq for FontConfig
impl StructuralPartialEq for FontConfig
Auto Trait Implementations§
impl Forget for FontConfig
impl Freeze for FontConfig
impl Move for FontConfig
impl RefUnwindSafe for FontConfig
impl Send for FontConfigwhere
RawVecInner: Send,
impl Sync for FontConfigwhere
RawVecInner: Sync,
impl Unpin for FontConfig
impl UnsafeUnpin for FontConfig
impl UnwindSafe for FontConfigwhere
RawVecInner: UnwindSafe,
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