eg-fontdue # A TTF/OTF renderer for embedded_graphics
eg-fontdue implements embedded_graphics's TextRenderer and CharacterStyle traits over the fontdue crate. Allowing for the rendering of arbitrary TTF/OTF fonts at any size.
Basic anti-aliasing is implemented, the anti-aliasing engine automatically chooses the inverse of the text color as the background color, if you do not want this, specify an anti-aliasing color with FontdueTextStyle::with_aa_color.
Since glyphs have to be manually rasterized, rendering times may vary, alloc is also required
use ;
// Load a font using `fontdue`
let ttf_font_data = include_bytes!;
let font = from_bytes?;
// Specify color and location
let style = new;
let rendered_text = new;
// Render
rendered_text.draw?;