tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

box drawing characters vs. WSDISPLAY_FONTENC_ISO


due to popular demand ( hi martin! ) I had a look at wsdisplay and supporting box drawing characters with fonts that don't have them, or rather can't have them because the encoding used doesn't leave room for them. We could just stick them into the lower 16 characters in ISO fonts but that would effectively create a new font encoding, so I came up with the idea to automatically generate them, add encoding tables for ISO fonts that map box drawing characters to 0x100 and above, store the images in their own wsdisplay_font and teach putchar() methods to use the alternate font for character codes above 0xff. That way drivers only need minimal modification, unmodified drivers will work as before, there are no API changes, no underhanded bait & switching with font bitmaps and no dodgy trickery that would probably break vga.

The code isn't quite complete yet:
- there's only a method to generate box drawing characters for 2 byte wide fonts. Support for 1 and 4 byte fonts is trivial to add though
- no attempt has been made to get this to work with screen rotation
- the attached patches only modify radeonfb and rasops' built-in character drawing methods The whole thing has only been tested on sparc64 so far, where it succeeds in drawing nice boxes around sysinst's menus using the Gallant font ( which has non-standard box drawing characters that nobody uses ). It should work with any ISO font that's 12 or 16 pixels wide.

- the images are generated per rasops_info. They should really be generated per font but wsdisplay_font is userland visible. - we should probably have a generic way to use more than one font at a time

There's of course potential to generate many other pseudo-graphics characters as well.

happy bikeshedding

Attachment: radeonfb.diff
Description: Binary data

Attachment: rasops.diff
Description: Binary data

Attachment: wsfont.diff
Description: Binary data

Attachment: PGP.sig
Description: This is a digitally signed message part

Home | Main Index | Thread Index | Old Index