NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: install/58288: 10.0 (final) sysinst terminated after "Window too short..." message on a EFI netbook EeePC



The following reply was made to PR install/58288; it has been noted by GNATS.

From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: install/58288: 10.0 (final) sysinst terminated after "Window too short..." message on a EFI netbook EeePC
Date: Tue, 28 May 2024 20:21:34 -0000 (UTC)

 martin%duskware.de@localhost (Martin Husemann) writes:
 
 > and the 10.0 kernel apparently does not select a usable font size for
 > the 1024 x 600 resolution (or it miss-probes the monitor size).
 
 
 Here is a patch that might help.
 
 It prefers the wide font only when you have at least 1280 pixels
 (8 * 80 * 2) and it choses the narrow font if both score equally.
 
 Index: sys/dev/wsfont/wsfont.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/wsfont/wsfont.c,v
 retrieving revision 1.80
 diff -p -u -r1.80 wsfont.c
 --- sys/dev/wsfont/wsfont.c	19 Feb 2023 05:35:35 -0000	1.80
 +++ sys/dev/wsfont/wsfont.c	28 May 2024 20:14:18 -0000
 @@ -619,15 +619,11 @@ wsfont_matches(struct wsdisplay_font *fo
  				return (0);
  		} else {
  			if (font->fontwidth > width) {
 -				score -= uimin(font->fontwidth - width, 9999);
 -				if ((flags & WSFONT_PREFER_WIDE) == 0) {
 -					score -= 10000;
 -				}
 +				score -= uimin(font->fontwidth - width, 4999) * 2 + 1;
  			} else {
 -				score -= uimin(width - font->fontwidth, 9999);
 -				if ((flags & WSFONT_PREFER_WIDE) != 0) {
 +				score -= uimin(width - font->fontwidth, 4999) * 2;
 +				if ((flags & WSFONT_PREFER_WIDE) != 0)
  					score -= 10000;
 -				}
  			}
  		}
  	}
 Index: sys/dev/wsfb/genfb.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/wsfb/genfb.c,v
 retrieving revision 1.91
 diff -p -u -r1.91 genfb.c
 --- sys/dev/wsfb/genfb.c	20 Jan 2024 00:24:58 -0000	1.91
 +++ sys/dev/wsfb/genfb.c	28 May 2024 20:14:18 -0000
 @@ -777,12 +777,14 @@ 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 MIN(cols, hsize / GENFB_CHAR_WIDTH_MM);
  }
  
  static int
 
 


Home | Main Index | Thread Index | Old Index