pub enum FontDisplay {
Auto,
Block,
Swap,
Fallback,
Optional,
}Expand description
How a font face is displayed while it loads, as named by the CSS
font-display descriptor of an @font-face rule.
The strategy governs the block period (during which text renders
invisibly, awaiting the face) and the swap period (during which a fallback
renders but is swapped for the face once it loads). FontDisplay::default
is Auto, matching CSS.
Displays as the CSS keyword (auto, block, swap, fallback,
optional).
Variants§
Auto
The font display strategy is defined by the user agent, CSS auto.
Block
Gives the font face a short block period and an infinite swap period,
CSS block.
Swap
Gives the font face an extremely small block period and an infinite swap
period, CSS swap.
Fallback
Gives the font face an extremely small block period and a short swap
period, CSS fallback.
Optional
Gives the font face an extremely small block period and no swap period,
CSS optional.
Implementations§
Source§impl FontDisplay
impl FontDisplay
Trait Implementations§
Source§impl Clone for FontDisplay
impl Clone for FontDisplay
Source§fn clone(&self) -> FontDisplay
fn clone(&self) -> FontDisplay
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more