use super::FontDb;
pub const CARLITO: &[u8] = include_bytes!(concat!(
env!(
"F_OFFICE_UNIT_TEST_FONTS",
"set F_OFFICE_UNIT_TEST_FONTS to the folder of the test fonts, which holds Carlito-Regular.ttf"
),
"/Carlito-Regular.ttf"
));
pub const CARLITO_FONTS: &str = r#"<w:rFonts w:ascii="Carlito" w:hAnsi="Carlito"/>"#;
pub const CARLITO_RUN: &str = r#"<w:rPr><w:rFonts w:ascii="Carlito" w:hAnsi="Carlito"/></w:rPr>"#;
pub fn carlito() -> FontDb {
let mut fonts = FontDb::new();
fonts.add_font(CARLITO.to_vec()).unwrap();
fonts
}
#[test]
fn the_carlito_run_sets_the_carlito_fonts_only() {
assert_eq!(CARLITO_RUN, format!("<w:rPr>{CARLITO_FONTS}</w:rPr>"));
assert_eq!(carlito().len(), 1);
}