PATCH: 5x8 font
Christian Vogel
vogelchr at vogel.cx
Sat Apr 10 16:46:48 CEST 2010
Hi Harald,
thanks for your comments. I'll address them below.
On Sat, 10 Apr 2010 10:26:05 +0300, Harald Welte <laforge at gnumonks.org>
wrote:
> 1) we need a way to select between individual fonts when writing
> to the display. I think in the long run it is inevitable that
> we'll use small and big letters on screen and have to select/
> switch between them.
> Something like display_select_font(FONT_5x8) to be called
> before a display_puts() sounds like a reasonable API for this.
I completely agree. The motivation for my (first) patch was mainly to
have *something* on the screen (e.g. serial port Rx/Tx bytes, whatever)
and that needs just a usable font and gotoxy. I never considered it
a final UI library.
But if we want to do it proper, I have a few question to you and the list:
- If we stick to multiple-of-8-high fonts (at least on the C128) we
can just blindly write at the proper location. The C155 (?) might
have different restrictions. Is this ok or should we try to support
arbitrary sized fonts?
- If we want to support arbitrary sized fonts, we either should buffer
the display in RAM (might be wasteful on high res color displays?)
or read/modify/write over i2c (might be slow, occupy the bus for too
long). What's your opinion on that?
- Which font-encoding should we use? I know that GSM 03.38 specifies
the encoding used for SMSs, but should we stick with that for
on-screen output? It's not ASCII compatible regarding []{}\...
Note:
<steve|m> in IRC told me that prom is probably already working on that?
Is he reading the list? prom, can you confirm?
> 2) Removing all the special characters might not be the best idea to do.
> If at all, it should be a compile time option whether or not to drop
> the special characters.
> Also, the check for replacing a character with '?' needs to be
> a font-specific and not a global decision.
I agree, see also 3rd tick-mark above.
> 3) introducing the new font should be one patch, fixing the 'miss
> topmost line' another patch, and any experimental changes to
> hello_world/main.c should be yet another patch. This way we
> can keep the commitlog a bit more clean.
OK, I agree with that. Btw: fixing the topmost line in the 8x8 font
will have to be done by whoever contributed the 8x8 font in the first
place :-)
Greetings from Bavaria,
Chris
More information about the baseband-devel
mailing list