Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#45938 - [gsfonts] ugly fonts on some web sites

Attached to Project: Arch Linux
Opened by patrick (potomac) - Sunday, 09 August 2015, 21:34 GMT
Last edited by Gaetan Bisson (vesath) - Friday, 14 August 2015, 05:13 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
since the last version of gsfonts (20150808-1) some web sites have a bad rendering for some fonts, the display is ugly,

if I downgrade to the previous version of gsfonts ( 20150122-1 ) all is ok, so there is a problem with gsfonts 20150808-1 version,

for example I notice the problem with this website :

http://forums.lenodal.com/

I made a screenshot, with the previous version of gsfonts ( 20150122-1 ) all is ok :

http://reho.st/self/47d91dbee912a5c614f2fc220ef21fac294adc51.jpg

but with the last version of gsfonts the fonts seems ugly, not good :

http://reho.st/self/32695cb2b1eb6f518bd38a31ccae8c24b5fbcc88.jpg

Additional info:
* package version(s) gsfonts-20150808-1
* config and/or log files etc. with this bugreport you will find my fontconfig configuration file


Steps to reproduce:
- update gsfonts to the 20150808-1 version
- on some websites you will notice a bad rendering for the fonts
This task depends upon

Closed by  Gaetan Bisson (vesath)
Friday, 14 August 2015, 05:13 GMT
Reason for closing:  Upstream
Comment by Gaetan Bisson (vesath) - Tuesday, 11 August 2015, 14:10 GMT
Just disable hinting...
Comment by patrick (potomac) - Wednesday, 12 August 2015, 01:55 GMT
  • Field changed: Percent Complete (100% → 0%)
disabling "hinting" is not enough, because there is still a huge difference in quality between gsfonts 20150808-1 and 20150122-1, the display in phpbb forum are still incorrect, please reopen this bugreport
Comment by Gaetan Bisson (vesath) - Wednesday, 12 August 2015, 02:23 GMT
Okay, could you report this upstream?
Comment by patrick (potomac) - Wednesday, 12 August 2015, 12:59 GMT
Do you know the url link for the bugzilla of gsfonts ?

because I can't find the way to create a bugreport in the gsfonts website :

http://git.ghostscript.com/?p=urw-core35-fonts.git
Comment by patrick (potomac) - Wednesday, 12 August 2015, 13:15 GMT
I tried to rebuild gsfonts package by testing each commit,

the problem begins with commit 24de0b9eb8fdb96b2446fe24c17b537a947cec22 :

http://git.ghostscript.com/?p=urw-core35-fonts.git;a=commit;h=24de0b9eb8fdb96b2446fe24c17b537a947cec22

and it gets worse with the last commit e5b3fce0aadb091699b409be325468c682bd436d :

http://git.ghostscript.com/?p=urw-core35-fonts.git;a=commit;h=e5b3fce0aadb091699b409be325468c682bd436d

you can see the log for commits here :

http://git.ghostscript.com/?p=urw-core35-fonts.git;a=log

the two last commits bring the bug, maybe it's also a problem with fontconfig, see the bug  FS#45928  :
https://bugs.archlinux.org/task/45928

I will try this patch for fontconfig in order to see if it solves the problem
Comment by Gaetan Bisson (vesath) - Wednesday, 12 August 2015, 13:21 GMT
I've just implemented  FS#45928  in fontconfig-2.11.1-2 from [testing].

Judging by the commits you pointed out as faulty, I guess the issue is that fontconfig now picks one of the new gsfonts fonts as closest to what the website asks for, and you do not like that new font as much as the old one it was picking. I'm not sure if that (and how) should be fixed...
Comment by patrick (potomac) - Wednesday, 12 August 2015, 13:47 GMT
I have just built a new fontconfig package with the 2 patches from  FS#45928  (0001-Revert-Bug-73291-poppler-does-not-show-fl-ligature.patch and 0002-Update-aliases-for-new-URW-fonts.patch ) , and the things get worse, it doesn't solve the problem, even If I downgrade the gsfonts package,

the only workaround for me is to use fontconfig 2.11.1-1 and a previous version of gsfonts, or to find a way to force firefox ( or fontconfig ) to use a specific font instead of the default provided by gsfonts-20150808-1,

I hope that someone else will also dislike the new fonts and will report these problems to the author of gsfonts ( or fontconfig ), phpbb forums are still popular and it's painfull to have such a bad display with the last version of gsfonts, you can see this in the 2 screenshots in my bugreport, the first screenshot shows the correct display, and the second screenshot shows how badly the fonts are rendering with the last version of gsfonts

Comment by Gaetan Bisson (vesath) - Wednesday, 12 August 2015, 14:29 GMT
Do I understand well that the issue you experience is only with phpbb forums?
Comment by patrick (potomac) - Wednesday, 12 August 2015, 14:38 GMT
it may occur also on others website but I am not sure,

for the moment I notice that the problem occurs on websites who use the phpbb forum kit,

I don't use proprietary fonts ( like microsoft ), I use only open source fonts from archlinux official repositories

here are the font packages I use :

artwiz-fonts 1.3-8
font-bh-ttf 1.0.3-3
font-bitstream-speedo 1.0.2-2
fontsproto 2.1.3-1
ftgl 2.1.3rc5-6
gsfonts 20150122-1 ( I downgrade to 20150122-1 because the 20150808-1 brings the problem on phpbb forums )
sdl2_ttf 2.0.12-2
sdl_ttf 2.0.11-3
ttf-bitstream-vera 1.10-10
ttf-cheapskate 2.0-10
ttf-dejavu 2.34-2
ttf-liberation 2.00.1-5
xorg-font-util 1.3.1-1 (xorg-fonts xorg)
xorg-fonts-100dpi 1.0.3-2 (xorg)
xorg-fonts-75dpi 1.0.3-2 (xorg)
xorg-fonts-alias 1.0.3-1
xorg-fonts-encodings 1.0.4-4 (xorg-fonts xorg)
xorg-fonts-misc 1.0.3-4
xorg-fonts-type1 7.7-1
xorg-mkfontscale 1.1.2-1 (xorg-apps xorg)
Comment by Vorbote (vorbote) - Wednesday, 12 August 2015, 17:53 GMT
The problem with Type 1 fonts is that Freetype do not render them well, to put it mildly. If they were CFF fonts (aka .otf fonts)[1], rendering would be equal or better than Truetype due to the CFF rendering engine donated by Adobe (and that I believe is enabled in Arch). Using hintstyle:hintfull and using lcd style antialiasing makes the rendering even worse. You can selectively force such fonts to be rendered with autohinting and with grayscale rendering. That will make them much easier on the eyes. Same goes, and it is even worse, for truetype fonts of the open source variety that are at most (and thankfully so), autohinted.

I did notice that the latest refresh from Artifex changed back the names to the Nimbus fonts, for the sake of compatibility and the modifications were made with fontographer. There could've been some hint corruption but I don't see anything glaring here; I have not changed freetype's rendering defaults and my screen works best in grayscale rendering mode. Yes, type 1 fonts are ugly but are very readable with some zooming, and font substitution works again in LibreOffice.

[1] Working on it. When I get the AFDK to stop fighting me.
Comment by Vorbote (vorbote) - Wednesday, 12 August 2015, 18:14 GMT
Hmm...! Loking closer at the screenshots: The OK one is rendered with bitmap fonts or Liberation Sans. Puzzling as you have disabled them in your fonts configuration file. See this:

$ fc-match Helvetica
n019003l.pfb: "Nimbus Sans L" "Regular"

With the previous version of the fonts, the name was "Nimbus Sans" and were not declared in the fontconfig configuration files, so you were not getting them onscreen at all, as Gaetan has pointed out previously.

And

fc-match Arial
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"

That's the same behavior as before. I doubt the site was rendered with Liberation Sans before.

Aha! Here is the smoking gun:

https://forums.lenodal.com/styles/subsilver2/theme/stylesheet.css

(...)
body {
/* Text-Sizing with ems: http : // www . clagnut . com / blog / 348 / */
font-family: "Trebuchet MS", "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
color: #323650;
//background-color: #FFFFFF;
(...)

This is an upstream bug, IMHO.
Comment by patrick (potomac) - Wednesday, 12 August 2015, 19:04 GMT
@Pedro :

if I install gsfonts-20150808-1 I have these output for fc-match :

$ fc-match Helvetica
n019003l.pfb: "Nimbus Sans L" "Regular"

$fc-match Arial
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"

if I downgrade to gsfonts-20150122-1 ( which is my current workaround, with fontconfig 2.11.1-1) I have a different output :

$ fc-match Helvetica
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"

$ fc-match Arial
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"

if I install the testing version of fontconfig ( 2.11.1-2 ) my workaround ( downgrading to gsfonts-20150122-1 ) doesn't work,

maybe the solution is to put a setting in my configuration file for fontconfig in order to switch the problematic fonts to the good ones, but I don't know how to do this
Comment by Vorbote (vorbote) - Wednesday, 12 August 2015, 20:25 GMT
@patrick

Add this snippet to your ~/.fonts,conf file, you can do this for Times, Courier, Arial, Courier New, Times New Roman, SymbolMT, etc.:

<alias binding="same">
<family>Helvetica</family>
<accept>
<family>Liberation Sans</family>
</accept>
</alias>

See the section "Map generic to specifics" in /etc/fonts/conf.avail/30-metric-aliases.conf, this will give you a better idea of what is going on. In summary, first you define which font can be a replacement for which, then in this section you set up the actual equivalents you want. BTW, TeX Gyre is really nice and you can use it as a second choice.
Comment by Vorbote (vorbote) - Wednesday, 12 August 2015, 20:31 GMT
Forgot to mention that previously you were getting Liberation Sans due to the convoluted logic in 30-metric-aliases.conf. Helvetica is declared as an alias:same of Arial and the other way around. Liberation Sans is declared as an alias:same of Arial, therefore it is Arial and ends up replacing Helvetica because there is no other higher priority font that would. Nimbus Sans and Nimbus Sans L have higher priority. Hmm... TeX Gyre has even higher priority.
Comment by patrick (potomac) - Wednesday, 12 August 2015, 20:53 GMT
@Pedro :

adding this to my fontconfig config seems to works :

<alias binding="same">
<family>Helvetica</family>
<accept>
<family>Liberation Sans</family>
</accept>
</alias>

I get a correct display now with gsfonts-20150808-1 on phpbb forums, it's a good workaround, thank you
Comment by Gaetan Bisson (vesath) - Friday, 14 August 2015, 05:13 GMT
Good to hear you found a workaround for your issue, Patrick. For our official packages, however, I'd like to stay as close to upstream as possible. But if there's any upstream commit that helps for your issue you'd like me to backport, please let me know. Cheers.

Loading...