About grub-1.91's terminal vesafb .(CJK characters)
Hello,
I discovered that, in the current GRUB 2 (1.91 and CVS as of today), the vesafb terminal cannot display fullwidth (16x16) CJK characters properly. (The vga terminal displays both halfwidth and fullwidth characters properly.)
I finally got it to work after some tweaking. Please see the attached patch file.
Thanks!
Andy Zheng <andy.zheng_AT_thizlinux_DOT_org>
ThizLinux Software Institute, Beijing
term/i386/pc/vesafb.c +4 -1
@@ -316,7 +316,10 @@ {unsigned char color; -if (bitmap[offset] & (1 << (8 -i))) +if (i ==8 ) + offset++; + +if (bitmap[offset] & (1 << (7 - i %8 ))) { color = p->fg_color; }
Quoted 9 lines · Andy Zheng
Hello,
I discovered that, in the current GRUB 2 (1.91 and CVS as of today), the vesafb terminal cannot display fullwidth (16x16) CJK characters properly. (The vga terminal displays both halfwidth and fullwidth characters properly.)
I finally got it to work after some tweaking. Please see the attached patch file.
Thanks for your note.
I already noticed this off by one problem, but it is not fixed in CVS. And it is a bit different fix. In my development version of video subsystem byte ordering for greater than width>8 is a bit different so the actual rendering code is different.
Could you test the new rendering code if it is a correct, as it is a bit harder for me to test foreigner glyphs :)
Here is link to latest code.
http://jumi.lut.fi/~vjaaskel/grub2/grub2-video-20051126.tar.gz
Now this rendering code reside in video/i386/pc/vbe.c (grub_video_vbe_blit_glyph).