Re: genfb(4) vs. screen types and font changes/uses (was: NetBSD vs. VirtualBox)
[email protected] (Michael van Elst)
| Newsgroups | gmane.os.netbsd.general |
|---|---|
| Organization | Serpens User Group |
| Message-ID | <[email protected]> |
[email protected] ("Greg A. Woods") writes: >What I really hate currently is how the font size changes when the >genfb(4) driver attaches. That's horrific looking and a bad UX! It >should continue to use the same font as the bootloader was using, and >that the kernel used up until that point. It may not even know that there is a font that it should keep. And switching screen resolution without switching font can also be ambitious. Doesn't mean that the font selection is ideal. You have already seen my changed heuristic. Here is another change: Index: genfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/wsfb/genfb.c,v retrieving revision 1.94 diff -p -u -r1.94 genfb.c --- genfb.c 10 Jan 2026 23:55:24 -0000 1.94 +++ genfb.c 25 Aug 2026 04:47:57 -0000 @@ -781,12 +781,12 @@ static int genfb_calc_cols(struct genfb_softc *sc, struct rasops_info *ri) { const int hsize = genfb_calc_hsize(sc); + const int cols = hsize ? hsize / GENFB_CHAR_WIDTH_MM : RASOPS_DEFAULT_WIDTH; - if (hsize != 0) { + if (hsize != 0 && cols > 2 * RASOPS_DEFAULT_WIDTH) ri->ri_flg |= RI_PREFER_WIDEFONT; - } - return MAX(RASOPS_DEFAULT_WIDTH, hsize / GENFB_CHAR_WIDTH_MM); + return cols; } static int