Subject: kern/8221: [dM] wscons spaces -> ugly vertical bars
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: netbsd-bugs
Date: 08/17/1999 22:53:56
>Number:         8221
>Category:       kern
>Synopsis:       [dM] wscons spaces -> ugly vertical bars
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 17 22:20:00 1999
>Originator:     der Mouse
>Release:        -current of 19990813
	Noticed on a SS1+ with bwtwo, should be present on anything
	with 1bpp, perhaps even anything less than 8 bpp, when using a
	suitable font.
	When characters are not exact numbers of bytes wide in the
	framebuffer (ie, when character boundaries do not all fall on
	byte boundaries), spaces are sometimes corrupted by ugly
	vertical bars.  This depends only on the X-coordinate of the
	character cell the space is being rendered into.
	Choose such a font (which may mean changing your FONT_*
	options, or possibly adding a font to dev/wsfont).  Boot a
	wscons-using kernel.  Display lots of spaces.  Notice the gross
	vertical bars.  I see this with GALLANT12x22 on a SS1+/bwtwo,
	and with FIXED6x13 (which I added) on the same.
	This fixes it for me, but I haven't had a chance to try other
	than 1bpp framebuffers.  (It also looks as though the code
	assumes 1 bits is background and 0 bits is foreground, but I
	haven't looked into that yet.)

	--- OLD/sys/dev/rasops/rasops1.c	Thu Jan  1 00:00:00 1970
	+++ NEW/sys/dev/rasops/rasops1.c	Thu Jan  1 00:00:00 1970
	@@ -182,8 +182,8 @@
	 		rmask = ~rasops_rmask[(col + width) & 31];
	 		if (uc == (u_int)-1) {
	-			bg = bg & ~lmask;
	 			width = bg & ~rmask;
	+			bg = bg & ~lmask;
	 			while (height--) {
	 				rp[0] = (rp[0] & lmask) | bg;

					der Mouse

		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B