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: [PATCH] loadable fonts finally fixed
From: Björn Stenberg (bjorn_at_haxx.se)
Date: 2002-09-16


Greg Haerr wrote:
> I suggest that the lcd_puts and/or
> lcd_putsxy automatically set up a string for scrolling
> if/when the string is wider than the display width.

The reason we do it explicitly is we only want one line scrolling at any one time. Several scrolling lines becomes very chaotic.

> If someone decides to do this, I suggest we move to a new,
> fnt_puts (or tputs) API, for a couple of reasons. First, the font
> code isn't really lcd driver code.

"lcd" does not refer to the lcd controller chip, it referes to the screen. And puts is more about working with the screen than working with the font.

> The other reason is that lcd_puts doesn't take a 'font' argument and
> lcd_putsxy does... It's goofy.

I want all of them to get rid of the font argument. All code should use the default (loaded) font, except for a few special cases which use the built-in and then *that* code should jump through hoops (lcd_setfont) to use a non-default font.

> My current font loader will only allow a single font to be
> loaded, but this will be rectified when I add a font_free() routine,
> which I'll add to my list.

Don't. We only need two fonts: The compiled-in fall-back font and the loaded font. More fonts means more complexity and more memory use. We don't need that.

-- 
Björn



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa