Bug 1349567 - broken-look with firefox for some web sites when open-sans-fonts is installed
Summary: broken-look with firefox for some web sites when open-sans-fonts is installed
Keywords:
Status: CLOSED DUPLICATE of bug 1332250
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-23 16:57 UTC by Hin-Tak Leung
Modified: 2017-03-03 15:20 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-03-03 15:20:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Screenshot of the popular phoronix web site. (36.54 KB, image/png)
2016-07-06 20:54 UTC, Hin-Tak Leung
no flags Details
site without open-sans-fonts (12.30 KB, image/png)
2016-12-15 02:07 UTC, M. Edward (Ed) Borasky
no flags Details
site *with* open-sans-fonts (8.52 KB, image/png)
2016-12-15 02:08 UTC, M. Edward (Ed) Borasky
no flags Details

Description Hin-Tak Leung 2016-06-23 16:57:08 UTC
Description of problem:
I started noticing many web pages on firefox, icecat, etc using a rather undesirable choice of fonts a while ago, and finally tracked it down with gnome-font-viewer to see which font is that. It is apx-fonts . /usr/share/fonts/apx/04b03.ttf .

The problem is that its name starts with "04b03", and therefore comes first in a fair number of font matches (don't know the exact criteria, but often enough)...

Version-Release number of selected component (if applicable):
apx-fonts-0.1-3.fc23.noarch
fontconfig-2.11.94-4.fc23.x86_64
fontconfig-2.11.94-4.fc23.i686

How reproducible:
Always, since installing it (I installed a whole lot of fonts a while ago, basically just did "dnf install -y *fonts").

Steps to Reproduce:
1. installing apx-fonts
2. go to some web sites
3.

Actual results:
undesirable font choice.

Expected results:
pick something more suitable.

Additional info:
I know I can configure it myself in ~/.config/fontconfig, but fedora should help in avoiding these in the first place; since "dnf install -y *fonts" is probably common enough action.

Comment 1 Akira TAGOH 2016-06-30 06:49:53 UTC
$ fc-query /usr/share/fonts/apx/04b03.ttf
Pattern has 22 elts (size 32)
        family: "04b03"(s)
        familylang: "en"(s)
        style: "Regular"(s)
        stylelang: "en"(s)
        fullname: "04b03"(s)
        fullnamelang: "en"(s)
        slant: 0(i)(s)
        weight: 80(i)(s)
        width: 100(i)(s)
        foundry: "unknown"(s)
        file: "/usr/share/fonts/apx/04b03.ttf"(s)
        index: 0(i)(s)
        outline: True(s)
        scalable: True(s)
        charset:
        0000: 00000000 ffffffff ffffffff 7fffffff 00000000 00000001 00000000 00000000
        0020: 00010000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
(s)
        lang: fj|ho|ia|ie|io|nr|om|so|ss|st|sw|ts|uz|xh|zu|kj|kwm|ms|ng|rn|rw|sn|za(s)
        fontversion: 65536(i)(s)
        fontformat: "TrueType"(s)
        decorative: False(s)
        postscriptname: "04b03"(s)
        color: False(s)
        symbol: False(s)

Less glyph coverage on this font. and no own config file in this package. so it may be rarely picked up as *better fonts* according to the request I suppose.

(In reply to Hin-Tak Leung from comment #0)
> The problem is that its name starts with "04b03", and therefore comes first
> in a fair number of font matches (don't know the exact criteria, but often
> enough)...

fontconfig doesn't do that simple.

This is basically that package specific issue though, I can't say off hand to make things better so far. please provide more details, which web sites will picks up this font, screenshot, and your preferrable language/locale.

Comment 2 Hin-Tak Leung 2016-06-30 15:49:34 UTC
It is often enough to be noticeable, for sure. Anyway, I already added a section to my own fontconfig and wish not to see it again. For various reasons I like to have all the fonts installed, but not necessarily used.

In .config/fontconfig/fonts.conf under the <selectfont></selectfont> section:

---
     <rejectfont>
            <pattern>
                 <patelt name="family"><string>04b03</string></patelt>
            </pattern>
     </rejectfont>
---

Comment 3 Raphael Groner 2016-07-06 20:35:41 UTC
I don't want to provide apx-fonts for general rendering of web pages and its purpose isn't that at all. It's a special font used in the game apx. If you don't want to play apx, please deinstall the package.

Comment 4 Hin-Tak Leung 2016-07-06 20:54:12 UTC
Created attachment 1177022 [details]
Screenshot of the popular phoronix web site.

Screenshot of the popular phoronix web site.

The url is at the top - it was a news pieces about cairo as/if you can read that.

Comment 5 Hin-Tak Leung 2016-07-06 20:56:17 UTC
That was with firefox, BTW.

Comment 6 Akira TAGOH 2016-07-07 06:35:00 UTC
(In reply to Hin-Tak Leung from comment #4)
> Created attachment 1177022 [details]
> Screenshot of the popular phoronix web site.
> 
> Screenshot of the popular phoronix web site.
> 
> The url is at the top - it was a news pieces about cairo as/if you can read
> that.

That works for me. what the language configuration and fonts in firefox do you have? those text seems requesting the family Segoe UI,Open Sans, Arial, sans-serif and the result of fc-match with it here is:

$ fc-match 'Segoe UI,Open Sans, Arial, sans-serif:style=bold'
LiberationSans-Bold.ttf: "Liberation Sans" "Bold"

is it different there?

Comment 7 Hin-Tak Leung 2016-07-07 10:39:43 UTC
$ fc-match 'Segoe UI,Open Sans, Arial, sans-serif:style=bold'
OpenSans-Bold.ttf: "Open Sans" "Bold"

Comment 8 Hin-Tak Leung 2016-07-07 10:46:37 UTC
Build identifier: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
LANG="en_GB.UTF-8"

I also checked about:addon, only NoScript extension and English (GB) Lang pack is on. All the plug-ins are either off or "Ask to Activate". I believe the latter also means "off (but prompt)".

Comment 9 Akira TAGOH 2016-07-07 10:54:04 UTC
How about the font settings in firefox? does this issue still persist if you create another profile and open the problematic url?

Comment 10 Raphael Groner 2016-07-09 12:06:48 UTC
I'm more and more going to think we see a feature request here.

There's nothing I can do to apx-fonts in particular, see comment #3. If we block a font like 04b03 to some applications like browsers, next user may come around the corner and wonders why it's not possible to use that font.

Comment 11 Akira TAGOH 2016-07-11 03:53:24 UTC
Raphael, we won't do apply any particular font specific changes into the fontconfig package, we recommend to do have one in each packages instead. that's why I originally reassigned this to apx. and I think simply rejecting the apx font in order to avoid this issue isn't a good idea because it is placed at the accessible dir. the optinos you have for disabling the apx font from fontconfig is, to 1) move out of fonts dir and have own dir 2) have own fontconfig config file to reject it.
If apx isn't a customer of fontconfig, 1) looks good to me though, would be good to ask on the list and get some feedbacks before taking any actions.

Anyway, we surely need more details to reproduce and a reason why it happened. waiting for a reply to my last comment.

Comment 12 Raphael Groner 2016-07-11 06:39:40 UTC
(In reply to Akira TAGOH from comment #11)
… 
> Anyway, we surely need more details to reproduce and a reason why it
> happened. waiting for a reply to my last comment.

+1

Comment 13 Nicolas Mailhot 2016-07-12 07:18:35 UTC
I think the problem is misdiagnosed

It has nothing to do with apx itself

The problem is in the way Fedora renders (at least some) open-sans versions

I had the same horribly pixelated effect (font "pixels" as big as some dingbats), I also attributed it to bitmap fonts, wasted a lot of time hunting them down with no effect, then finally installed a firefox extension to identify the font used

To my surprise it pointed opensans and removing the opensans packages from the system fixed the problem.

Either Fedora misbuilds opensans or something in it horribly confuses the text stack or firefox

This is on a hidpi system (full hd 13" chromebook)

Comment 14 Nicolas Mailhot 2016-07-12 07:21:15 UTC
/var/log/dnf.rpm.log-20160711:302:Jul 09 12:25:50 INFO Erased: open-sans-fonts-1.10-3.fc23.noarch
/var/log/dnf.rpm.log-20160711:303:Jul 09 12:25:50 INFO Erased: open-sans-fonts-1.10-3.fc23.noarch

Comment 15 Hin-Tak Leung 2016-07-12 07:41:55 UTC
That's interesting...

$ rpm -q open-sans-fonts
open-sans-fonts-1.10-4.fc24.noarch

I'll try getting rid of it the next time I reboot, and see if it helps. That sounds plausible, as I do have from comment 7:

$ fc-match 'Segoe UI,Open Sans, Arial, sans-serif:style=bold'
OpenSans-Bold.ttf: "Open Sans" "Bold"


I thought it was the apx font, as it is the only one with that pixellated look when I opengnome-font-viewer .

Comment 16 Akira TAGOH 2016-07-12 09:26:56 UTC
Hm, so I think it isn't a bug then? because it is the expected result according to what that page requests? or if it is a quality issue in open-sans-fonts, we may need to do something there. let's reassign this to open-sans-fonts so far.

Comment 17 Nicolas Mailhot 2016-07-12 11:56:10 UTC
actually open sans is a vector font. There is a bug somewhere in the text stack that makes firefox scale bitmaps for open sans instead of using its outlines

That, unless the Fedora open sans build is totally broken

Comment 18 Hin-Tak Leung 2016-07-12 18:17:42 UTC
Yes, uninstalling open sans fixes the firefox issue. Actually on my system, there are two identical copies of OpenSans-Bold.ttf . One belongs to open-sans-fonts and is hooked up to fonconfig, the other belonging to texlive-opensans isn't.

I also checked with ftview that it is normal-looking - and it did look normal under gnome-font-viewer. Hence the confusion with apx-fonts.

I suspect it might be the otc integration with firefox 44+ which broke it?

Both the glyf table and the loca table are a bit broken according to the current Microsoft Font Validator.

Apologies about apx-fonts - OTOH, if it is for a single app's use, it should be like TeXLive's font arrangement - installed but not hooked into fontconfig.

Comment 19 Nicolas Mailhot 2016-07-14 14:12:34 UTC
(In reply to Hin-Tak Leung from comment #18)

> Apologies about apx-fonts - OTOH, if it is for a single app's use, it should
> be like TeXLive's font arrangement - installed but not hooked into
> fontconfig.

Actually apx is packaged correctly and TeXLive – not

Squirrelling fonts away in apps only results in massive duplication (like there), various states of font rot, apps that fail miserably with locales not supported by their private font stash. At least when they are all exposed to the system problems can be detected and fixed either in the font itself or in the system text stack.

Comment 20 Nicolas Mailhot 2016-07-15 20:54:28 UTC
While the trigger may be in the font file, coping with broken fonts is part of the text stack mission, and open sans is really too common to be ignored

→ reassigning to firefox, feel free to push it lower if the boog is in one of the libs it uses

Comment 21 M. Edward (Ed) Borasky 2016-12-15 02:01:53 UTC
I've got this too ... symptom is that some sites render an ugly all-caps font with open-sans-fonts installed ... screenshots coming

Comment 22 M. Edward (Ed) Borasky 2016-12-15 02:07:06 UTC
Created attachment 1231942 [details]
site without open-sans-fonts

site is http://crooksandliars.com/2016/12/officials-say-putin-personally-involved, Firefox is from Fedora 25

Comment 23 M. Edward (Ed) Borasky 2016-12-15 02:08:05 UTC
Created attachment 1231943 [details]
site *with* open-sans-fonts

Comment 24 Dawid Zych 2017-01-11 12:38:24 UTC
Open Sans font package is broken: https://bugzilla.redhat.com/show_bug.cgi?id=1332250

Comment 25 Hin-Tak Leung 2017-03-03 15:20:42 UTC
I have re-installed a version of open sans with the corrected fontconfig as outlined in the discussion in bug 1332250, so this is AFAIK a duplicate of bug 1332250 . Thanks for the heads-up.

*** This bug has been marked as a duplicate of bug 1332250 ***


Note You need to log in before you can comment on or make changes to this bug.