1
0
Fork 0
forked from len0rd/rockbox

Anti-Aliased Fonts support.

This enables Rockbox to render anti-aliased fonts using an alpha blending method.
The input font bitmaps are 4bit, i.e. 4x larger, but the metadata size stays the same.

A tool, convttf, for converting ttf fonts directly to the Rockbox fnt format is provided.
It has a useful help output, but the parameter that works best is -c1 or -c2 (2 for larger font sizes).

Flyspray: FS#8961
Author: Initial work by Jonas Hurrelmann, further work by Fred Bauer, Andrew Mahone, Teruaki Kawashima and myself.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29523 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2011-03-05 18:36:51 +00:00
parent 396ddd9fd7
commit 9edd6d4ee9
11 changed files with 1939 additions and 27 deletions

View file

@ -203,9 +203,15 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
}
bits = font_get_bits(pf, *ucs);
LCDFN(mono_bitmap_part)(bits, ofs, 0, width, x + base_ofs, y,
width - ofs, pf->height);
#if defined(MAIN_LCD) && defined(HAVE_LCD_COLOR)
if (pf->depth)
lcd_alpha_bitmap_part(bits, ofs, 0, width, x + base_ofs, y,
width - ofs, pf->height);
else
#endif
LCDFN(mono_bitmap_part)(bits, ofs, 0, width, x + base_ofs,
y, width - ofs, pf->height);
if (is_diac)
{
current_vp->drawmode = drawmode;