Console attributes that only relate to CJK

by Michael S. Kaplan, published on 2005/10/10 03:01 -04:00, original URI:

Back in February of this year, KJK::Hyperion asked:

Michael, do you happen to know what these console character attributes are _really_ for?


The only real information I've found is a KB article (;en-us;145925 ) explaining that they won't be supported in Windows 95, but it doesn't say a lot about them, and no mention of "keisen ruled lines" anywhere else on the internet. Any idea?

And then just last month, Robert Hodge asked the same question:

Do you know of any way to get characters to take an underscore attribute when being used by a Win32 Console application? The MSDN documentation for SetConsoleTextAttribute and CHAR_INFO (etc.) talks about an attribute called COMMON_LVB_UNDERSCORE, which is used like a 'color' setting and is used to get characters underlined, but it supposedly is associated with DBCS. I have tried using it but without success. I am considering a fallback strategy of altering a font to include pre-underlined characters, but that would be a lot of work. Any ideas? Thanks.

Unfortunately, the documentation is correct -- this particular feature is only supported in CJK (Chinese, Japanese, Korean) contexts.

Rich support of text is something better suited to non-console applications. These attributes are not generally available. Sorry!


This post brought to you by "●" (U+25cf, a.k.a. BLACK CIRCLE)

# KJK::Hyperion on 11 Oct 2005 11:04 AM:

I was more interested in their meaning, since it isn't documented anywhere and back then I was writing a clone of the Windows console :-)

# Robert Hodge on 19 Nov 2005 10:09 PM:

This is a followup question about console font indexes and font names.

I am able to call GetCurrentConsoleFont function and it seems to work. I get back a value of 14 as the console font index. My question is, can I convert a font index to a font face name? On my system, Lucida Console has a font index of 14. So how do I go from an index of 14 to a face name of "Lucida Console" ? I want to know this so that I can go back and make a query on the currently active font, if a truetype font, to check if certain unicode ranges are present in the given font. (I care about unicode font ranges because I have chosen to use the unicode "full width forms" region to store pre-underscored ASCII character glyphs; I need to know if the current font is one I have hacked so that if I use such characters, they won't show up as blanks if they aren't defined.) But I can't do that if I don't know what the current console font's name is. Any clue how to do this?

Robert Hodge

# Michael S. Kaplan on 20 Nov 2005 5:11 AM:

I think you will need to call the GetCurrentConsoleFontEx function to get the name here.

# Robert Hodge on 23 Nov 2005 8:11 PM:

GetCurrentConsoleFontEx would be a good choice if I were running XP, but I need this to run on Win2K also, and that doesn't have GetCurrentConsoleFontEx. Any guess how I could achieve the functionality of GetCurrentConsoleFontEx in Win2K ?

# Michael S. Kaplan on 23 Nov 2005 8:49 PM:

Hmmm... you've got me, I have no idea, really. :-(

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

go to newer or older post, or back to index or month or day