andrew icon indicating copy to clipboard operation
andrew copied to clipboard

get_regular_family_fonts("sans") fails to find any font in a flatpak

Open JMS55 opened this issue 4 years ago • 3 comments

See https://github.com/Smithay/client-toolkit/issues/170#issuecomment-754922916

JMS55 avatar Jan 05 '21 21:01 JMS55

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 avatar Jan 23 '21 16:01 JMS55

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

r-c-f avatar Feb 23 '21 19:02 r-c-f

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.

ArtemGr avatar Sep 29 '21 16:09 ArtemGr