use std::{io, path::Path};
use graphics::glyph_cache::rusttype;
use texture::TextureSettings;
use crate::RenderBuffer;
pub type BufferGlyphs<'a> = rusttype::GlyphCache<'a, (), RenderBuffer>;
#[allow(clippy::result_unit_err)]
pub fn buffer_glyphs_from_bytes(font_data: &[u8]) -> Result<BufferGlyphs, ()> {
BufferGlyphs::from_bytes(font_data, (), TextureSettings::new())
}
pub fn buffer_glyphs_from_path<'a, P: AsRef<Path>>(font_path: P) -> io::Result<BufferGlyphs<'a>> {
BufferGlyphs::new(font_path, (), TextureSettings::new())
}