mar...@duskware.de (Martin Husemann) writes: >But I fail to find the details that make it fit together, starting with >a way to change the font / test resolution of an exisiting screen or an >easy way to guess the output filename of ttf2wsfont (in the above example >and $height = 42 it would be: Ubuntu_Mono_19x38.wsf, but how would the script >guess that? Of course it could do a temporary directory and look for *.wsf, >but that sounds like a hack).
wsfont uses a list of builtin fonts defined by kernel configuration. The drivers use the font list to select the "best" font to get a 25x80 character display when they are initialized. That happens before fonts can be loaded. The font list can be augmented by using WSDISPLAYIO_LDFONT (the wsfontload command) on drivers that implement the load_font operation. WSDISPLAYIO_SFONT can configure a font at runtime, again it relies on the driver implementing load_font. Unlike LDFONT it also initializes and resizes the display to the new font. load_font exists natively for the vga and ega (text mode) driver (some other drivers implement a dummy that always fails). load_font is also implemented by the vcons layer (netbsd-8), so it exists for all(?) framebuffer drivers. However, the driver has to be tagged as VCONS_LOADFONT as well. machfb, r128fb, radeonfb, mgx and genfb set VCONS_LOADFONT. load_font doesn't load a font from external storage, it loads a font into the graphics driver. Loading a font is done in two stages (taken from the vcons commit message), e.g.: wsfontload -N foo /usr/share/wscons/fonts/flori.816 wsconsctl -dw font=foo -- -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."