swash/scale/
proxy.rs

1use super::{
2    super::{metrics::MetricsProxy, strike::BitmapStrikesProxy, FontRef},
3    color::ColorProxy,
4};
5
6#[derive(Copy, Clone)]
7pub struct ScalerProxy {
8    pub metrics: MetricsProxy,
9    pub color: ColorProxy,
10    pub bitmaps: BitmapStrikesProxy,
11    pub coord_count: u16,
12}
13
14impl ScalerProxy {
15    pub fn from_font(font: &FontRef) -> Self {
16        Self {
17            metrics: MetricsProxy::from_font(font),
18            color: ColorProxy::from_font(font),
19            bitmaps: BitmapStrikesProxy::from_font(font),
20            coord_count: font.variations().len() as u16,
21        }
22    }
23}