summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-03-05 18:36:51 +0000
committerThomas Martitz <kugel@rockbox.org>2011-03-05 18:36:51 +0000
commit9edd6d4ee912273690b2600e8c52183dfa058eb9 (patch)
treecf6b0723f42c090022b94b38b3c4d856e9378d40 /firmware/export
parent396ddd9fd79e458d1107f4065ce072eef99b6bce (diff)
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/export')
-rw-r--r--firmware/export/font.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/export/font.h b/firmware/export/font.h
index 0a75768fa5..a85f95e6ae 100644
--- a/firmware/export/font.h
+++ b/firmware/export/font.h
@@ -68,7 +68,7 @@ enum {
* USHORT maxwidth 2 font max width in pixels
* USHORT height 2 font height in pixels
* USHORT ascent 2 font ascent (baseline) in pixels
- * USHORT pad 2 unused, pad to 32-bit boundary
+ * USHORT depth 2 depth of the font, 0=1bit and 1=4bit
* ULONG firstchar 4 first character code in font
* ULONG defaultchar 4 default character code in font
* ULONG size 4 # characters in font
@@ -92,6 +92,7 @@ struct font {
int ascent; /* ascent (baseline) height*/
int firstchar; /* first character in bitmap*/
int size; /* font size in glyphs*/
+ int depth; /* depth of the font, 0=1bit and 1=4bit */
const unsigned char *bits; /* 8-bit column bitmap data*/
const void *offset; /* offsets into bitmap data,
uint16_t if bits_size < 0xFFDB else uint32_t*/