diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2011-03-05 18:36:51 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2011-03-05 18:36:51 +0000 |
| commit | 9edd6d4ee912273690b2600e8c52183dfa058eb9 (patch) | |
| tree | cf6b0723f42c090022b94b38b3c4d856e9378d40 /firmware/drivers/lcd-bitmap-common.c | |
| parent | 396ddd9fd79e458d1107f4065ce072eef99b6bce (diff) | |
| download | rockbox-9edd6d4ee912273690b2600e8c52183dfa058eb9.zip rockbox-9edd6d4ee912273690b2600e8c52183dfa058eb9.tar.gz rockbox-9edd6d4ee912273690b2600e8c52183dfa058eb9.tar.bz2 rockbox-9edd6d4ee912273690b2600e8c52183dfa058eb9.tar.xz | |
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
Diffstat (limited to 'firmware/drivers/lcd-bitmap-common.c')
| -rw-r--r-- | firmware/drivers/lcd-bitmap-common.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index 364fb3c..fc84fdd 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -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; |