NetBSD-Users archive

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

Re: X font puzzles



On Tue, 22 Jul 2025, Steve Blinkhorn wrote:

So I switched the service over to an identical machine whose
principal role was to provide outward-facing services: mail, named
etc.  It appeared at first to be a seamless transition, until I saw
that characters typed into an xterm were echoed horizontally offset to
the right, so were largely unreadable.


Can you post a screenshot, and your ~/.Xresources (or ~/.Xdefaults) file?
Also the output of running `locale'.

Characters programatically output to the screen are rendered correctly.


Do you mean chars. typed in are double-width, but, anything output by, say,
echo(1) or printf(1) looks OK?

I use lucidatypewriter as my STD_FONT, 18 point in deference to my presbyopia.


`xterm -fn lucidasanstypewriter-18' on 10.1_STABLE looked fine just now...

So I turned to a NetBSD 9.2 box, and here I hit a different problem.
Using Xvnc as started by the same vncserver script as before, I get
the right screen dimensions (1920x1080) but not the font I want or the
size I want.  It looks like there was a major reorganisation of fonts
some time between 7.0 and 9.2, with more layers of configuration.  How
do I specify th lucidatypewriter font I want (it's there, I can see it
through xlsfontas,


Almost all "classic" X programs understand `-fn fontname' to specify bitmap
fonts. To use TTF fonts with xterm, use `-fa something -fs NN'. Eg:

xterm -fn lucidasanstypewriter-18
xterm -fa 'DejaVu Sans Mono' -fs 13

Run fc-list(1) to see the list of TTF/OTF fonts.

but I don't get told where it is in the > filesystem).


```
$ fgrep lucidasanstypewriter $(find /usr/X11R7 /usr/pkg \( -name fonts.dir -o -name fonts.alias \) )
[...]
/usr/X11R7/lib/X11/fonts/100dpi/fonts.alias:lucidasanstypewriter-18 -b&h-lucidatypewriter-medium-r-normal-sans-25-180-100-100-m-150-iso8859-1
[...]
$
```

then,

```
$ fgrep lucidatypewriter-medium-r-normal-sans-25 $(find /usr/X11R7 /usr/pkg \( -name fonts.dir -o -name fonts.alias \) )
[...]
/usr/X11R7/lib/X11/fonts/100dpi/fonts.dir:lutRS18-ISO8859-1.pcf.gz -b&h-lucidatypewriter-medium-r-normal-sans-25-180-100-100-m-150-iso8859-1
[...]
/usr/X11R7/lib/X11/fonts/100dpi/fonts.dir:lutRS18.bdf -b&h-lucidatypewriter-medium-r-normal-sans-25-180-100-100-m-150-iso10646-1
$
```

to see where the chosen font file lives.

Finally, with native X on 9.2, despite specifying a geometry of
1920x1080 in my startx script, I get a 1024x768 display.  Why?


If your kernel display driver is genfb or vesafb, then X will use the wsfb(4)
or vesa(4) display drivers, and xrandr doens't work on those. If this is what
your issue is (post /var/run/dmesg.boot) get a better resolution like this:

https://wiki.netbsd.org/tutorials/x11/how_to_use_wsfb_uefi_bios_framebuffer/

-RVP


Home | Main Index | Thread Index | Old Index