LCDproc development and user support list

Text archives Help

[Lcdproc] Improvements to imon driver: special characters and smoother hbar

Chronological Thread 
  • From: joris AT (Joris Robijn)
  • Subject: [Lcdproc] Improvements to imon driver: special characters and smoother hbar
  • Date: Sun Jun 3 12:00:02 2007

We've had quite some discussion about this in the past. Indeed there is
more required than just a mapping. There are two linked things,
characters and icons. I will try to give a summary of what we came up
last time.

Character mapping is for chars not at the correct place in the character
table; We have used ISO8859-1 as the default in the client interface and
driver API. The driver should map the chars to the ones it is knows. If a
character does not exist in the device's char table, there are two
options: 1. replace it with another char; 2 create a custom char for it.
The latter could for example be done for the missing backslash in the
HD44780 char-table. The driver should remember it has created the custom
char for backslash and reuse it when a second backslash is placed on the
screen. At every call to _clear everything should be forgotten, because
the screen will be rebuilt.

Icons are things that are not in the ISO8859-1 charmap and therefor
always need to be placed as custom characters. That is, until there is no
space for custom chars anymore. Then the driver should know a fall-back
character which is to be placed instead. It may not look as fancy but at
least it's there.

Further, the user could theoretically create its own icons and place
them. This system has never been completed. For multiple displays the
first display (primary) supplies info on cellsize.

We came up with the idea to create a custom char library. The library
should implement the behaviour for chars and icons, because it is always
basically the same. It should have these functions:

0. Learn: a function with which the driver can tell the lib its
- char-mapping table;
- custom char memory size;
- cell size;
- special char -> custom char data table and fall-back char;
- icon -> custom char data table and fall-back char.

1. Translate: Return a translated char to be placed for a given char. If
no translation is needed it will return the input char. The driver is to
place that char in the framebuffer. If some translation is needed,
possibly involving custom chars, the translated char is returned.

2. Reserve custom char: If a special char, a v/hbar or an icon is needed,
it can be reserved with this function. If there is the no more place in
the custom char space, the fall-back char is returned. This function is
called by the above function and the _icon, _hbar etc functions.

3. Clear: forgets the used custom chars. Should be called by _clear.

4. Define icon: to define a (new?) icon that can be placed by the _icon

This is just a summary of what I remember of a couple of years back.
Maybe I forgot some things, but everything is all still in the mail
archives. If you think of an other way to solve things, please speak up.
Can we solve the current issues with a lib like this ?

Joris Robijn
<joris AT>
Mobile: +31 6 288 41 964

Archive powered by MHonArc 2.6.18.

Top of page