use super::*;
impl GlyphKey {
#[must_use]
pub fn from_style(codepoint: char, physical_size: f32, weight: FontWeight) -> Self {
let clamped: f32 = physical_size.clamp(6.0, 256.0);
let size_tenths: u16 = (clamped * 10.0 + 0.5) as u16;
Self::new(codepoint, size_tenths, weight.is_bold())
}
}