On Thu, Aug 04, 2022 at 04:42:57PM +0200, Walter Alejandro Iglesias wrote: > Hello everyone, > > Two days ago I installed OpenBSD (current) in my laptop after two years > of not using it (I mean the OS), so I'm not aware of the latest changes. > Right after installing it I found fontconfig is generating issues with > some applications. I will describe those that appeared with xterm. > > Run xterm with the default system Xresources, open the "VT Fonts" dialog > (holding down Ctrl and pressing right mouse button) check TrueType > Fonts. At least to me, fontconfig writes the following error: > > $ xterm > Fontconfig error: Cannot load default config file: No such file: (null) > > Even if you implicitly set the variables the result is the same: > > $ export FONTCONFIG_FILE=/etc/fonts/fonts.conf > $ export FONTCONFIG_PATH=/etc/fonts > $ xterm -xrm xterm*renderFont:false > Fontconfig error: Cannot load default config file: No such file: > (null)
You must have caused some damage to the default installation. Did you check that /etc/fonts/fonts.conf still exists and is readable by everyone ? (and that the directories /etc and /etc/fonts still have the correct mode). > > Another issue I can reproduce with xterm is running it with a xft font > and selecting in the same mentioned dialog the "Unreadable" font: > > $ xterm -fa "DejaVu Sans Mono" > xterm: Selected font has no valid height for ISO-8859-1 encoding > xterm: Selected font has no valid width for ISO-8859-1 encoding > > > Finally, the following issue doesn't affect the mentioned bug, but cause > some problems in some applications. I noticed that this directory: > > /usr/X11R6/lib/X11/fonts/misc/ > > is *far* more populated in Debian than in OpenBSD, so I copied those fonts > from Debian to OpenBSD, and this solved encoding errors in fvwm2, for > example. I don't know if those fonts were removed upstream or by some > OpenBSD maintainer to win space. Be aware that even when OpenBSD > supports only UTF-8 those fonts are still needed by some applications. > We removed all bitmapped fonts with encodings other than iso8859-1 and utf8 last year. The ISO-8859-1 are still there. I can't reproduce the error message that you show with xterm, so either you also have a damaged /usr/X11R6 or there is some other setting in your environment that cauases that. I know that some applications using libXfont2 will complain if they can't find easter european, koi8 or iso1022-jp encoded bitmap fonts, but we've not yet found an application in ports where these message cause it to mal-function. There are fonts with those encoding available in ports (and it's still possible to package the fonts with extra encodings in ports if there is a real need -- but it didn't show up yet). -- Matthieu Herrb
