Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Loadable fonts patch

Re: Loadable fonts patch

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 2 Aug 2002 11:54:44 +0200 (MET DST)

On Fri, 2 Aug 2002, Alex Gitelman wrote:

> 1. Refactor bdf2ajf to be ANSI compliant and always properly handle CRLF

Ok, I learned that this was what bit me hard. The program is quite annoying
for any non-windows users as long as this isn't fixed...

I have not yet been able to actually get any characters on my simulated
screen. I really can't tell what I'm doing wrong, but this is what happens:

[ stripping off CRs from the input file ]
$ tr -d '\015' < alt8x8.bdf > alt8x8_2.bdf
$ mv mv alt8x8_2.bdf alt8x8.bdf

$ make
./bdf2ajf -f alt8x8.bdf -o system.ajf

[ check how the output ajf file looks like ]
$ od -x system.ajf
0000000 bdfc 0041 4c54 3878 3800 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000040 0000 0008 0008 0000 0000 0008 0000 0000
0000060 0000 0000 0800 0000 0000 0000 0008 0000
0000100 0000 0000 0000 0800 0000 0000 0000 0008
0000120 0000 0000 0000 0000 0800 0000 0000 0000
0000140 0008 0000 0000 0000 0000 0800 0000 0000
0000160 0000 0008 0000 0000 0000 0000 0800 0000
0000200 0000 0000 0008 0000 0000 0000 0000 0800
0000220 0000 0000 0000 0008 0000 0000 0000 0000
0000240 0800 0000 0000 0000 0008 0000 0000 0000
[break]

So all characters end up blanks in the output file, and yes, they end up
blank on my screen too ;-) What do I need to do?

Regarding code:

In the function ajf_get_charbuf() you have a loop to detect where the start
of the particular letter starts. I don't like this having to loop from 0 to
ASCII-code for each single letter we want to output. I would instead suggest
that whe you load the font, you create a lookup-index for each letter as
it'll make it a lot faster.

Regarding fonts:

Where can I find a bdf font that has the same size as the smallest default
Rockbox font (6x8)? We can't have any bigger as the smallest default, it
would be insane...!

-- 
  Daniel Stenberg -- Rocking the box => http://bjorn.haxx.se/rockbox/
Received on 2002-08-02

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy