[PATCH] Kernel fbcon UNICODE font support

From: Microcai
Date: Fri Nov 26 2010 - 00:52:50 EST


Hi,

I know there are most people speaking only English, and never meet
non-ASCII characters on console. But, hey , what about others ?
Then, some of you may come up with a idea than ,there is already fbterm
than supports non-ASCII characters in user-space.
But, what if you forgot to run fbterm ? And what about some program
that must be run on native tty console ? Or I just want init script
display fine Native Language?

So, here is the solution: Making framebuffer console handle UNICODE font in
kernel.
The first thing I need to handle is that, currently there is no room
for adding UNICODE font, only 8bit for characters, how can you do?
Also , some characters are double-width. So the solution is make an
backing store. 0xFE and 0xFF stands for character value store else
where, and 0xFF means , left-half of the else where character, and 0xFE
means right-half of the else where character.

This is a basic solution, the best is that making vc->vc_screenbuf
store full UNICODE/attribute value, But changing it may break some
drivers, so , currently I won't try that way.

The UNICODE font just too large to be included in e-mail, please follow

http://minilab.tk/0002-add-cjk-font-that-has-65536-chars.patch to get
that.
This font is copyrighted by youbest@xxxxxxxx, also he is the original
author of this patch. I don't have a chance to reach him. If there be
any license issue, just re-generated from WenWuanYi(http://wenq.org/)
open-source font. So , this should not be a big deal.

In future, we don't have to compile that big font into kernel, we
should use setfont to load UNICODE font.
But, .psf does not support that much charcount (or maybe yes, and I
need some search? ), new font format need to be discussed, or make
setfont using .pcf font that come with X11

So, here is the patch that add UNICODE font handling functionary.

know bugs:

compile in UNICODE font , then never use setfont unless
setfont updated to use PCF font. And also this patch
updated to support that.
if not , setfont will use non-unicode font replace the in-kernel
unicode font, that's probably not what you want