Bug#1070454: Fallback fonts do not work
Ben Wong
bugs.debian.org at wongs.net
Sun Mar 15 05:43:04 GMT 2026
Package: gargoyle-free
Version: 2026.1.1+dfsg-1
Followup-For: Bug #1070454
X-Debbugs-Cc: bugs.debian.org at wongs.net
Howdy Maintainer,
In a related issue, the Gargoyle fonts aren't being found even when
searching FontConfig.
I had wanted to zoom the font size to be a bit larger. The man page
says to run `gargoyle-free -e` to edit the configuration. However, if
you do that and save the file without making changes, gargoyle will
no longer function at all. Instead, a dialog box pops up reading,
Unable to find font "Gargoyle Mono" for Mono Regular,
and fallback Gargoyle-Mono.ttf not found
As a workaround, I extracted the fonts directory from the
gargoyle-2026.1.1.tar.gz file and placed it in
~/.local/share/fonts/gargoyle/. It contains the following
files:
Gargoyle-Mono-Bold-Italic.ttf Gargoyle-Serif-Italic.ttf
Gargoyle-Mono-Bold.ttf Gargoyle-Serif.ttf
Gargoyle-Mono-Italic.ttf README
Gargoyle-Mono.ttf unifont.otf
Gargoyle-Serif-Bold-Italic.ttf unifont_upper.otf
Gargoyle-Serif-Bold.ttf
Please install the fallback fonts so that they work out of the box.
------
I am not sure if this is a good idea, but since this package already
depends on fonts-go and fonts-sil-charis, it may make sense to use
aliases in /etc/fonts/conf.d instead of duplicating the font files.
Something like this ought to work:
--------------8<----------CUT HERE--------------------8<--------------
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias binding="same">
<family>Gargoyle Serif</family>
<prefer>
<family>Charis SIL</family>
<family>serif</family>
</prefer>
</alias>
<alias binding="same">
<family>Gargoyle Mono</family>
<accept>
<family>Go Mono</family>
<family>monospace</family>
</accept>
</alias>
</fontconfig>
--------------8<----------CUT HERE--------------------8<--------------
However, gargoyle currently seems to have a odd design choice in its
FontConfig code, or possibly a bug. The problem is that it uses
FcFontList (unsorted list of results) when it should use FcFontSort
(sorted list). Even better since gargoyle only looks at the first
result anyhow, one can use FcFontMatch (just the single font that
matches the criteria best) without needing to mess with FcObjectSets.
Gargoyle could be fixed so that fontconf aliases work as expect by
patching the file garglk/fontfc.cpp like so:
--------------8<----------CUT HERE--------------------8<--------------
--- garglk/fontfc.cpp.orig 2026-02-07 20:18:56.000000000 -0800
+++ garglk/fontfc.cpp 2026-03-14 14:15:27.660518305 -0700
@@ -34,23 +34,23 @@
static nonstd::optional<std::string> findfont(const std::string &fontname)
{
FcChar8 *strval = nullptr;
+ FcResult result;
auto p = garglk::unique(FcNameParse(reinterpret_cast<const FcChar8 *>(fontname.c_str())), FcPatternDestroy);
if (p == nullptr) {
return nonstd::nullopt;
}
- auto os = garglk::unique(FcObjectSetBuild(FC_FILE, static_cast<char *>(nullptr)), FcObjectSetDestroy);
- if (os == nullptr) {
+ if (FcConfigSubstitute(cfg, p.get(), FcMatchPattern) != FcTrue) {
return nonstd::nullopt;
}
-
- auto fs = garglk::unique(FcFontList(cfg, p.get(), os.get()), FcFontSetDestroy);
- if (fs->nfont == 0) {
+ FcConfigSetDefaultSubstitute(cfg, p.get());
+ auto fpat = FcFontMatch(cfg, p.get(), &result);
+ if (result != FcResultMatch || fpat == nullptr) {
return nonstd::nullopt;
}
- if (FcPatternGetString(fs->fonts[0], FC_FILE, 0, &strval) == FcResultTypeMismatch || strval == nullptr) {
+ if (FcPatternGetString(fpat, FC_FILE, 0, &strval) == FcResultTypeMismatch || strval == nullptr) {
return nonstd::nullopt;
}
--------------8<----------CUT HERE--------------------8<--------------
Thanks,
--Ben
-- System Information:
Debian Release: forky/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.18.15+deb14-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages gargoyle-free depends on:
ii fonts-go 0~20170330-2
ii fonts-sil-charis 6.200-1
ii libc6 2.42-13
ii libfmt10 10.1.1+ds1-4+b1
ii libfontconfig1 2.17.1-5
ii libfreetype6 2.14.2+dfsg-1
ii libgcc-s1 16-20260308-1
ii libpng16-16t64 1.6.55-1
ii libqt6core6t64 6.9.2+dfsg-4+b1
ii libqt6dbus6 6.9.2+dfsg-4+b1
ii libqt6gui6 6.9.2+dfsg-4+b1
ii libqt6widgets6 6.9.2+dfsg-4+b1
ii libsdl2-2.0-0 2.32.10+dfsg-6
ii libsdl2-mixer-2.0-0 2.8.1+dfsg-5
ii libspeechd2 0.12.1-3
ii libstdc++6 16-20260308-1
ii libturbojpeg0 1:2.1.5-4
ii zlib1g 1:1.3.dfsg+really1.3.1-3
gargoyle-free recommends no packages.
gargoyle-free suggests no packages.
-- no debconf information
More information about the Pkg-games-devel
mailing list