Re: xcalc missing fonts

From: Steve Rikli <sr_at_genyosha.net>
Date: Wed, 25 Jun 2025 18:15:11 UTC
On Wed, Jun 25, 2025 at 09:55:34AM -0800, Gary Aitken wrote:
> 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.

Fwiw, my 14.3 system has these:

$ pwd
/usr/local/share/fonts
$ l
100dpi/    OTF/       cyrillic/  encodings/ noto/
75dpi/     TTF/       dejavu/    misc/
$ find . -name fonts.dir
./misc/fonts.dir
./dejavu/fonts.dir
./noto/fonts.dir
./TTF/fonts.dir
./OTF/fonts.dir
./100dpi/fonts.dir

I've not manually created or otherwise manipulated anything therein. I expect
some of those were created today when I installed xcalc (see below).

> 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.

My 'xset q' shows a Font Path:
  /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins

> 1, Does anyone else see this same problem with xcalc not displaying
> the divide and square-root buttons correctly?

My xcalc divide and sqrt symbols look OK. For reference:

$ xcalc --version
xcalc 1.1.2

Fwiw this is from a pkg install I just did today; the pre-reqs it came with:

  New packages to be INSTALLED:
	font-adobe-100dpi: 1.0.3_4 [FreeBSD]
	font-alias: 1.0.4 [FreeBSD]
	font-misc-misc: 1.1.2_4 [FreeBSD]
	xcalc: 1.1.2_1 [FreeBSD]

> 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.

Not a reference or documentation per se, but this 14.3-STABLE system has
no /usr/local/etc/X11/fonts.d/ subdir at all.

I don't know if any of this is helpful to you or not.

Cheers,
sr.