use super::FontGlyphPaint;
const BOLD_SCALE: [(u32, f64); 14] = [
(600, 0.96153847),
(700, 0.96666664),
(800, 0.94285713),
(900, 0.97435898),
(1000, 0.97674416),
(1100, 0.97872337),
(1200, 0.98039215),
(1300, 0.9818182400000001),
(1400, 0.96666664),
(1500, 0.984375),
(1600, 0.98529411),
(1800, 0.98684212),
(2000, 0.97647057),
(2400, 0.99009903),
];
pub(super) fn bold_paint(fs: f64, dpi: f64) -> Option<FontGlyphPaint> {
let size = super::super::font_frame_metrics::base_unit_at_dpi(fs, dpi);
let (_, scale_x) = BOLD_SCALE.iter().find(|(base, _)| *base == size)?;
Some(FontGlyphPaint {
stroke_width: fs * 0.02,
scale_x: *scale_x,
})
}
pub(super) fn bold_extra_advance(dpi: f64) -> f64 {
crate::renderer::hwpunit_to_px(75, dpi)
}