FS#57460 - [xscreensaver] akruti[12].ttf interferes with xscreensaver

Attached to Project: Arch Linux
Opened by Akash Rawal (akash_rawal) - Saturday, 10 February 2018, 12:18 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 07 May 2018, 15:28 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Eric Belanger (Snowman)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

akruti1.ttf, akruti1b.ttf, akruti2.ttf, akruti2b.ttf map english characters to Indian ones (why?) and breaks text rendering in xscreensaver.

Steps to reproduce:
- Install both ttf-indic-otf and xscreensaver
- Lock screen with xscreensaver / start splash screen.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 07 May 2018, 15:28 GMT
Reason for closing:  Fixed
Additional comments about closing:  xscreensaver 5.39-1
Comment by Gaetan Bisson (vesath) - Sunday, 11 February 2018, 05:07 GMT
The only thing the ttf-indic-otf package does is install a bunch of fonts under /usr/share/fonts/TTF/. To fix your issue, the real question is why were those fonts selected for use with xscreensaver. That may be a fontconfig issue or an xscreensaver issue. So I suggest you bring that up with those packages' maintainers. Cheers.
Comment by Akash Rawal (akash_rawal) - Sunday, 11 February 2018, 13:31 GMT
I looked into xscreensaver a little deeper, and observed that for "splash.headingFont" xscreensaver by default is searching for following XLFDs:

1. -*-helvetica-bold-r-*-*-*-180-*-*-*-*-iso8859-1
2. -*-bitstream charter-bold-r-*-*-*-160-*-*-*-*-iso8859-1
3. -*-*-bold-r-*-*-*-180-*-*-p-*-iso8859-1

xlsfonts has following reactions to the above:
$ xlsfonts -fn '-*-helvetica-bold-r-*-*-*-180-*-*-*-*-iso8859-1'
xlsfonts: pattern "-*-helvetica-bold-r-*-*-*-180-*-*-*-*-iso8859-1" unmatched
$ xlsfonts -fn '-*-bitstream charter-bold-r-*-*-*-160-*-*-*-*-iso8859-1'
xlsfonts: pattern "-*-bitstream charter-bold-r-*-*-*-160-*-*-*-*-iso8859-1" unmatched
$ xlsfonts -fn '-*-*-bold-r-*-*-*-180-*-*-p-*-iso8859-1'
-misc-akrutitml1-bold-r-normal--25-180-100-100-p-0-iso8859-1
-misc-akrutitml2-bold-r-normal--25-180-100-100-p-0-iso8859-1
-misc-dejavu sans condensed-bold-r-semicondensed--25-180-100-100-p-0-iso8859-1
-misc-dejavu sans-bold-r-normal--25-180-100-100-p-0-iso8859-1
-misc-dejavu serif condensed-bold-r-semicondensed--25-180-100-100-p-0-iso8859-1
-misc-dejavu serif-bold-r-normal--25-180-100-100-p-0-iso8859-1
$

My guess is whatever comes first is being used. I also assume Engilsh alphabets should look like english ones, that is the point of character encoding AFAIK, but I may be wrong!

PFA akruti1b.ttf opened in fontforge.
Comment by Gaetan Bisson (vesath) - Sunday, 11 February 2018, 14:59 GMT
The akruti TTF files reuse the ASCII space on purpose. Your problem is that xscreensaver selects that font. It should really match for less general things than '-*-*-bold-r-*-*-*-180-*-*-p-*-iso8859-1'. So I see two solutions:
1. Fix xscreensaver by making it look for more fonts (bistream vera, dejavu, sans, etc.). Perhaps there is a configuration switch for this or perhaps the code needs to be patched.
2. (Less satisfying:) Install one of fonts xscreensaver does look for.
Comment by Akash Rawal (akash_rawal) - Tuesday, 13 February 2018, 03:34 GMT
How about separating akruti TTF files (and others that reuse ASCII space) into a separate package? These won't be used for rendering Indian text that use encodings correctly, nor to write text when using an input method.

Adding more patterns to xscreensaver would only make the problem less likely. Plus we'd need to repeat this for each software that uses xlib directly to draw text. A general solution to reject such fonts would be much better, if at all possible.
Comment by Gaetan Bisson (vesath) - Friday, 16 February 2018, 16:57 GMT
There have always been symbol fonts reusing the ASCII latin range for other purpose (as fonts for other scripts have been doing too). That's why you don't just pick a random font! For a generic latin font, xscreensaver should (as most other programs do) use fontconfig's defaults: sans or serif. With X11 font names it's not as simple but that does not mean it should just give up and use a random font.

The PKGBUILD for ttf-indic-otf is a simple case of installing upstream's tarball contents to the correct directories and if you wish to have changes made on it (such as splitting latin range-reusing fonts to a separate tarball) you should bring that up upstream. But your problem, really, is with xscreensaver.
Comment by Akash Rawal (akash_rawal) - Thursday, 22 February 2018, 16:22 GMT
The xscreensaver developer has been informed of this issue before I created the bug report. I have this patch here, but we have concerns whether wildcards as a part of font names are portable, hence rejected by upstream.

Loading...