LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Patch for underlined text on Console? (https://www.linuxquestions.org/questions/linux-kernel-70/patch-for-underlined-text-on-console-442730/)

hammernail 05-08-2006 05:56 AM

Patch for underlined text on Console?
 
Is anyone aware of a patch (or something) to allow the use of underlined text on a color linux console?

As you all know; it is usually not possible to use the escape sequence '\e[4m' to get underlined text on the console (unless you use a monocrome console). There is no real reason for this to be the case on (say) a modern framebuffer console where the font is in software anyways.

It all appears to boil down to the console driver not using a sufficiently wide datatype to store the character atributes.


I guess there are a number of ways in which it could be solved:
1, Fixing it properly so the attributes can be stored.
2, Defining a big font where underscored versions of the characters are stored asif they are bold versions of the characters and sacraficing bold characters and vt escapes to get underlined characters (I'd rather not have to do this).
3, sacrafice some obscure set of attributes that no one ever uses to represent the underscored text internally then render this attribute as underlines on output.

I find myself forced to use super-heavy X and daft x-terminals just because I need underlined text!

Is anyone aware of any patches (or ready-made tricks) that solve the problem?

DaveG 05-09-2006 06:37 PM

You should be able to change the system font. I only know about Fedora Core and that isn't well documented. The default font is set in /etc/sysconfig/i18n. The value eventually makes it's way to /bin/setfont. The font files are all under /lib/kbd/consolefonts.

I wanted a ~132 column text console on the FC5 box (text only) and changed the default font from "latarcyrheb-sun16" to "lat9w-08". Some of the fonts provided show underlined text as strike-through, some don't do bold etc. The "lat9w-08" font (/lib/kbd/consolefonts/lat9w-08.psfu.gz) worked out the best for me.

Your system may do things differently, but if the font file formats are the same you could try some of the FC5 fonts. The RPM package is named "kbd".


All times are GMT -5. The time now is 09:43 PM.