|
Rockbox mail archiveSubject: loadable fonts - patch infoloadable fonts - patch info
From: Greg Haerr <greg_at_censoft.com>
Date: Wed, 11 Sep 2002 19:19:19 -0600 Bjorn/Daniel, I've included a couple more comments concerning the patch submitted today: 1. The loadable fonts patch needs the following line in apps/settings.c: #include "font.h" 2. I didn't include any automatic making of .c or .fnt files from .bdf files in the make system. This should be added. Ideally, a .c.bdf Makefile rule could be added that automatically builds a .o file from a .bdf file, and the .bdf source is used when building. (currently, this requires perl so win32 could have an issue.) 3. Perhaps a config file should be used to set which fonts get loaded and/or assigned to which FONT_xxx designators. The current system is very simple and uses compiled-in specifications. 4. I've been looking into the Cyrillic stuff that Alex wrote. Basically, it finds two-byte strings in filenames that start with hex 04 and then converts the second byte to a > 0x80 character to index the font file. It's not unicode, but really codepage-mapping. There's a couple of ways we could deal with this. The new font code allows actual unicode-indices into a .bdf font. But the lcd_putsXX API handles only 8-bit characters... a) We could remove the special-case code in firmware/drivers/fat.c that converts the "unicode" sequence into a specially-hacked codepage sequence. Instead, look for this special "unicode" sequence in lcd_puts and lcd_putsxy and convert to a codepage required for the FONT_UI font. (this isn't that big a deal, removes kluges, and keeps the special code in the lcd/font drivers only. We would add a hard-coded codepage conversion table in the new sysfonts[] structure for a given font.) Note that currently, we're not running anywhere near unicode, nor UTF-8. We're basically running ISO8859-1 (8-bit chars) with the current code, and require a matching .bdf font (many comply) b) Build a new lcd_puts API that takes actual unicode and pass MP3 filename data and other UI strings in UTF-8 encoded unicode. I think option (a) is far simpler for the time being. We might want to state that all strings should be in UTF-8 encoding, and attempt to enforce this for the filesystem as well. (Daniel - what's the specification for FAT32 filenames??) Alex - if you could give send me an encoding table (not included in the font file) that maps the byte following the 04 page into your font index for alt8x8 and alt6x10.bdf, I can add this and we should be running. Note also that you need to convert you .bdf files to Linux not DOS format or my bdf2c decoder won't work. 5. The only bug I've found when running in the simulator has to do with the lcd_framebuffer[][] being overrun when drawing in WPS past the end of the screen. I haven't found the code that does this yet, it may need to be clipped in lcd_bitmap(). Regards, Greg Received on 2002-09-12 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |