Michele, Bernhard, and all,

On Tuesday 16 September 2008 15:16:02 Michele Sanges wrote:
> 2008/9/16 Bernhard Reutner-Fischer <[EMAIL PROTECTED]>
> > thanks. Don't you think that's a bit excessive? :)
> Yes, but I think also that this feature could be easily put under
> conditional compilation.

Yes, it should be a config option.

> > The fontmap sounds like it could reside in RO, perhaps.
> What you mean with RO? Read only memory? Isn't it hardware dependent?
> Please, can you give me a more detailed description?

-static char fontmap[95][12] = {
+static const char fontmap[95][12] = {

> Also, the fontmap could reside in a external file with the applet that loads
> one character at a time.

Yes please do so, this way people could have 'personalised' font maps.
Still, offer a config option to hardcode the fontmap file.

And a further improvement would be to support multibyte-strings for
localisation.

I would recommend having a simple font file like:
  # Lines starting with # are ignored
  # So are empty line
  0x12345678 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C

where the first hexa number is the UTF-8 sequence to be recognised, and the
folowing single bytes are the patern to draw.

Of course, the font table will be sparse, and finding the character to
draw will need (smart) iteration throught the table. And because the table
might miss entries for some characters, have a default character be drawn
(eg 0x00000000).

Then, in the build procedure, have a litle script that parses that file format
and outputs either a .h file if the font is hardcoded, or a binary blob if the
font is dynamicaly loaded at run time.

So to sum up:
 - text rendering should be configurable
 - the font map can be either hard-coded to use the default font map,
   or it can be dynamically loaded at runtime, so the user can create
   their own font maps
 - font map should be UTF-8 compliant, to allow localisation.
 - the source font map format should be documented (at least in the
   default font map).

Of course, this is but my opinion. :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'

_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to