|
Rockbox mail archiveSubject: Re: converting old fonts startedRe: converting old fonts started
From: Greg Haerr <greg_at_censoft.com>
Date: Tue, 17 Sep 2002 11:24:08 -0600 : So I converted the old character tables (hex values are columns) into : a bdf-like format (hex values are rows). Great! : oldfont.table table of the old .c source : newfont.bdf my stupidly converted bfd : newfont.bmp bmp that proofs that characters are ok somehow : : oldpropfont.table same as above : newpropfont.bdf .. : newpropfont.bmp .. I'll take a look at these, I have some initial comments below. : : I'm no bdf expert and therefore I only took another bdf file and : changed the character definitions with the output of my script. : : There are wrong values in these files because I don't know the : meaning of the keywords inside the bdfs.. Here's the BDF specification, it's not small and a useful read: http://partners.adobe.com/asn/developer/pdfs/tn/5005.BDF_Spec.pdf : : So the next step would be that a "bdf-expert" (I'm not! ;) ) makes : correct bdf files out of these or someone tells me a good and simple : (Windows) bdf program so that I can correct and complete these fonts. Run the tools/bdf2c script "./bdf2c newfont.bdf > newfont.c" and it will convert the files to a .c file for visual inspection of the glyphs and origin offset. Later, you can run "./bdf2fnt newfont" and it will create newfont.fnt, which if copied to /system.fnt will become the UI font (for simulator or real target) You can replace firmware/X5x8.c with your .c file and it will become the base compiled-in font. : : If someone wants the characters in the attached files slightly changed : somehow because they're wrong (one pixel up, down,... other : STARTCHAR/ENCODING count offset), write me and I'll send another file! : I especially shifted the values of the newfont.bdf 3 pixels so that : the bmp looks more correct, I don't know if this is right. You need to change the ENCODING value to start at 32, which is 0x20 (ascii space). Also, set DEFAULT_CHAR to 32. The DWIDTH value sets the individual font character width. The BBX w h x y value sets the size of the included BITMAP array in w,h, and the offset into the font at x,y. Normally, you can use exactly the same values for all the characters here except the w value, which should be the same as DWIDTH since you're manually creating it. : : Hope that my approach helps.. It does, we can then have .bdf versions of the original fixed and proportional fonts. Take another pass at it and I'll check it with some other bdf converters for correctness. Regards, Greg : : Bye, Uwe. Received on 2002-09-17 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |