Subject: Re: Default console font
To: None <port-macppc@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-macppc
Date: 11/05/2003 19:25:44
>> Might I suggest changing the default console font to FONT_VT220L8x16?  
>> It looks a LOT better than the Gallant font on a Mac screen.

> 1) if it's the dimensions in characters that bother you, see how
>    wscons finds the screen size in pixels and how it converts that to
>    a number of characters, and fix the code if necessary.

Well, I'm going to stick my neck out a little here and say that...

- wscons knows the screen size in pixels because the framebuffer driver
  tells it that when it hooks it up with wscons.

- the driver's wscons setup also passes a maximum size in characters.

- wscons divides the screen size in pixels by the font size in pixels
  and uses the smaller of that value and the value passed by the
  driver.

>    Under 1.5 the behavior is not obvious -- I get strange margins at
>    certain screen resolutions.

As I recall, wscons also aligns things to 32-bit boundaries, which
(depending on screen depth) may mean anywhere from nothing to 32-pixel
alignment.  Except for that, wscons centres the character area with
respect to eh pixel area.

> Unfortunately I haven't looked through wscons enough.  I don't even
> know who could explain it.

It actually isn't all _that_ difficult to follow the code.  You just
need to be prepared to grep around to find where something is called a
few times.  dev/tc/cfb.c is a decent example of a wscons framebuffer
driver exhibiting the above....

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B