Re: xcalc missing fonts

From: Gary Aitken <freebsd_at_dreamchaser.org>
Date: Wed, 25 Jun 2025 17:55:34 UTC
On 6/24/25 20:25, Gary Aitken wrote:
> On 6/24/25 16:13, Ralf Mardorf wrote:
>> On Tue, 2025-06-24 at 13:44 -0800, Gary Aitken wrote:
>>> It's my understanding all that's needed is xorg-fonts-100dpi or -75dpi
>>> and way back when I'm pretty sure that was the case.
>>>
>>> Hints?
>>
>> Probably the same issue as I experienced on Arch Linux.
>>
>> I installed xorg-fonts-100dpi and -75dpi. After that I needed to run
>>
>> $ xset fp+ /path_to_fonts_100dpi/,/path_to_fonts_75dpi/
>> $ xset fp rehash

This doesn't change the behavior; still no divide symbol or square-root on the
xcalc buttons:

$ xset q | grep font
   catalogue:/usr/local/etc/X11/fontpath.d,built-ins,/usr/local/share/fonts/100dpi/,/usr/local/share/fonts/freefont-ttf/,/usr/local/share/fonts/75dpi/,/usr/local/share/fonts/misc/
$ xset fp rehash
$ xcalc
Warning: Cannot convert string "8x13" to type FontStruct
Warning: Missing charsets in String to FontSet conversion
Warning: Cannot convert string "-adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*" to type FontStruct

> Where is the actual font data?

 From the handbook, /usr/local/share/fonts/<fontdir>

Looking at the individual font directories, there is no fonts.dir in some of them.
The server log shows:
  (WW) `fonts.dir' not found (or not valid) in "/usr/local/share/fonts/misc/".
     Entry deleted from font path.
     (Run 'mkfontdir' on "/usr/local/share/fonts/misc/").
Running mkfontdir in each of the subdirs in /usr/local/share/fonts solves the problem:

# bash
# cd /usr/local/share/fonts
# for dir in * ; do cd $dir ; mkfontdir ; cd .. ; done

$ xset fp rehash
$ xcalc

However, doing an "xset fp default" restores the original behavior,
so I still have to set the font path explicitly despite the fonts.dir files
now being present.

Restarting the server solves the problem.

Questions I have remaining:

1, Does anyone else see this same problem with xcalc not displaying the divide and
square-root buttons correctly?
i.e. missing fonts.dir files in some of /usr/local/share/fonts/* directories?

2. Of all the ports in x11-fonts, only cyr-rfx and uw-ttyp0 have a pkg-plist
which contains an active reference to fonts.dir.  In all the others, there is
either no pkg-plist at all, or the fonts.dir line is commented out:
   $ grep fonts. freefonts/pkg-plist
   @comment %%FONTSDIR%%/fonts.dir
   @comment %%FONTSDIR%%/fonts.scale
Are the fonts.dir files supposed to be auto-generated after pkg install?

3. Can anyone point me to a description of exactly what is supposed to be in
/usr/local/etc/X11/fonts.d/ ?  My searches are coming up useless.

Thanks,

Gary