All of lore.kernel.org
 help / color / mirror / Atom feed
* About grub-1.91's terminal  vesafb .(CJK characters)
@ 2005-11-27  1:27 Andy Zheng
  2005-11-28 13:04 ` Vesa Jääskeläinen
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Zheng @ 2005-11-27  1:27 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 412 bytes --]

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

[-- Attachment #2: grub-1.91-vesafb-write-char-fullwidth.patch --]
[-- Type: text/x-patch, Size: 360 bytes --]

--- grub-1.91~/term/i386/pc/vesafb.c	2005-11-25 15:22:36.000000000 +0800
+++ grub-1.91/term/i386/pc/vesafb.c	2005-11-25 15:28:36.000000000 +0800
@@ -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;
 	    }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: About grub-1.91's terminal  vesafb .(CJK characters)
  2005-11-27  1:27 About grub-1.91's terminal vesafb .(CJK characters) Andy Zheng
@ 2005-11-28 13:04 ` Vesa Jääskeläinen
  0 siblings, 0 replies; 2+ messages in thread
From: Vesa Jääskeläinen @ 2005-11-28 13:04 UTC (permalink / raw)
  To: The development of GRUB 2

Andy Zheng wrote:
> 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).




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-28 13:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-27  1:27 About grub-1.91's terminal vesafb .(CJK characters) Andy Zheng
2005-11-28 13:04 ` Vesa Jääskeläinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.