andrew
andrew copied to clipboard
get_regular_family_fonts("sans") fails to find any font in a flatpak
See https://github.com/Smithay/client-toolkit/issues/170#issuecomment-754922916
It appears that andrew::text::fontconfig::FontConfig::get_font_dir_files() fails to find any files called fonts.dir. I don't know enough about fontconfig to tell if andrew should be using something else, or if flatpak needs to have that file.
@JMS55 fonts.dir is the output from mkfontfdir that indexes fonts by the old X logical font descriptors, so if you include that as part of your packaging process it should work. The fact that andrew is using XLFDs instead of fontconfig proper is indeed highly suspect, however.
Per https://www.x.org/archive/X11R7.0/doc/html/fonts2.html, "Installing scalable fonts", I'm doing
cd /usr/share/fonts/truetype/dejavu && sudo mkfontscale && sudo mkfontdir
cd /usr/share/fonts/truetype/freefont && sudo mkfontscale && sudo mkfontdir
Just my two cents.