Bug 1217542 - fonts-config breaks monospaced fonts if hinting is used
Summary: fonts-config breaks monospaced fonts if hinting is used
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: X.Org (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Marguerite Su
QA Contact: Gfx Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-27 20:05 UTC by Fabian Vogt
Modified: 2024-02-09 14:31 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Vogt 2023-11-27 20:05:21 UTC
/etc/fonts/conf.d/11-base-rendering.conf contains:

        <!-- hint type: autohinter or BCI -->
        <match target="font">
                <edit name="autohint" mode="assign">
                        <bool>true</bool>
                </edit>
        </match>

This overrides hinting information stored within fonts and so FT makes up hinting info on its own. This however is not guaranteed to preserve glyph dimensions, making monospaced fonts no longer monospaced. With Hack at 9px, "@s" overlaps: https://openqa.opensuse.org/tests/3762078#step/konsole/6

It works in Konsole with Qt 5 because that disables hinting explicitly.

I see https://github.com/openSUSE/fonts-config/commit/2d3c5b86306ee1f45fd13a01b309f2e5dc00f61b drops this, but the referenced 09-autohint-if-no-hinting.conf is not enabled in our fontconfig package either.
Comment 1 Takashi Iwai 2023-11-28 17:12:05 UTC
fonts-config package hasn't been updated for long time, as it seems.

I tried to catch up the git version, and also includes the missing 09-*.conf.
Could you try the package in OBS home:tiwai:branches:M17N?
Comment 2 Fabian Vogt 2023-11-28 17:37:51 UTC
(In reply to Takashi Iwai from comment #1)
> fonts-config package hasn't been updated for long time, as it seems.
> 
> I tried to catch up the git version, and also includes the missing 09-*.conf.
> Could you try the package in OBS home:tiwai:branches:M17N?

Works, thanks!
Comment 3 Takashi Iwai 2023-11-29 07:23:23 UTC
OK, thanks.

Now I submitted my update package.  Let's see whether this works out.
Comment 4 Stefan Dirsch 2024-02-09 13:06:33 UTC
So does this fix the issue now?

# osc cat openSUSE:Factory fonts-config fonts-config.changes
-------------------------------------------------------------------
Mon Dec 11 09:12:07 UTC 2023 - pgajdos@suse.com

- version update to 20231210+git0.f7216ba
  * Fix typos in 32-emoji-reject.conf and 59-family-prefer-lang-specific
  * remove SEARCH_METRIC_COMPATIBLE sysconfig variable and infra around [bsc#1216356]
- deleted patches
  - 0001-Fix-typos-in-32-emoji-reject.conf-and-59-family-pref.patch (upstreamed)

-------------------------------------------------------------------
Tue Nov 28 16:38:44 UTC 2023 - Takashi Iwai <tiwai@suse.com>

- Update to 20230604+git0.630c8206607c:
  * Fix uninitialised use of the HOME environment variable
    (bsc#1086804,bsc#1210700)
  * font match and pattern match can't put in one file.
  * source han are packaged nowadays, no need to give alias;
    just give CFF fontformat fonts in zh-/ja/ko hintfull
  * split 59-family-prefer-lang-specific to cjk/noto and raw,
    the former two may be generated by scripts in later version
  * emoji support(part1): add emoji family
  * delete 10-group-tt*.conf, since fontconfig 2.14 introduces
    09-autohint-if-no-hinting.conf (bsc#1217542)
  * Fix fonts-config does not read user config with `-u` option given
  * widen comparison operator for emoji fonts
- Fix typos in the configs:
  0001-Fix-typos-in-32-emoji-reject.conf-and-59-family-pref.patch
- Enable 09-autohint-if-no-hinting.conf from fontconfig

[...]
Comment 5 Fabian Vogt 2024-02-09 13:16:46 UTC
(In reply to Stefan Dirsch from comment #4)
> So does this fix the issue now?

Whatever is in TW right now looks good in openQA at least.
Comment 6 Stefan Dirsch 2024-02-09 14:31:07 UTC
Ok. Then let's close it as fixed ...