use embedded_graphics::prelude::*;
#[derive(Debug, Clone)]
pub struct FontConfig<C: PixelColor> {
pub color: C,
pub size: u32,
}
impl<C: PixelColor> FontConfig<C> {
pub fn new(color: C, size: u32) -> Self {
Self { color, size }
}
}
impl<C: PixelColor> Default for FontConfig<C>
where
C: From<embedded_graphics::pixelcolor::Rgb565>,
{
fn default() -> Self {
Self {
color: embedded_graphics::pixelcolor::Rgb565::BLACK.into(),
size: 12,
}
}
}