Font hinting lost on chrome like browser

Bug #1823461 reported by Mohammad Anwar Shah on 2019-04-06
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
language-selector (Ubuntu)
Medium
Gunnar Hjalmarsson
Bionic
Medium
Gunnar Hjalmarsson

Bug Description

[Impact]

The file for configuring Japanese rendering with Noto fonts does not refer to the font family with sufficient precision, so it may affect rendering with other fonts unintentionally. The proposed upload fixes the issue.

[Test Case]

The real tests have been reported in comment #6 and #7 of this bug report.

To verify that the modified file is properly installed:

1. Install language-selector-common and language-selector-gnome from
   bionic-proposed

2. Run this command:

cat /etc/fonts/conf.avail/69-language-selector-ja.conf | grep 'Noto Sans CJK JP'

(should output the line "<string>Noto Sans CJK JP</string>")

[Regression Potential]

That config file was added specifically for rendering Japanese with Noto fonts, and the modified file has been confirmed by the original author. Hence the regression risk should be low.

[Original description]

Since Ubuntu 18.04 (maybe from 17.10, I don't remember now), Chrome browsers are horrible to use. Font hintings are not working as expected. There were always some hairy things above the fonts which caused me to abandon Ubuntu. Unfortunately, this bug affected all other Ubuntu derivatives as well. I was forced to use Debian and Manjaro, because nowhere in the Internet I found a solution.

I've tested Ubuntu 19.04 again. I removed all of the *.conf file in `/etc/fonts/conf.d` dir and copied Manjaro's configs. The fonts are okay. Further investigating revealed that the culprit was symlink to this file `/etc/fonts/conf.avail/69-language-selector-ja.conf`

I opened it and found that on Line no 8, it has this

<test qual="all" name="family" compare="contains">

which should instead be

<test qual="all" name="lang" compare="contains">

since `JP` is language identifier, not family.

I manually fixed the file and all is well!

I'm attaching two screenshot of chrome browser. Inspect the "Autofill" and "Appearance" word of the chrome setting page screenshot.

I couldn't add the fixed screenshot. Here it is

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in fontconfig (Ubuntu):
status: New → Confirmed

Sorry, both of the screenshot were same. Here is the fixed screenshot

Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your report and for your efforts to nail the problem. Unfortunately the solution you propose would not be a proper fix. "JP" is not a "lang" thing, the purpose is to match part of the family name.

Nevertheless, there seems to be something with that configuration file. The similar bug #1787215 was reported a few months ago.

Attached please find an idea of a modified file. Would be great if you could confirm that it addresses your issue.

And @Mitsuya, can you please confirm that the modified file works as the current one when rendering Japanese.

affects: fontconfig (Ubuntu) → language-selector (Ubuntu)
Changed in language-selector (Ubuntu):
importance: Undecided → Medium

I used your proposed modified file and the result was same as fixed. But I can't confirm with Japanese text since I don't use JP.

Mitsuya Shibata (cosmos-door) wrote :

Thank you for notify.

Gunnar's patch looks good to me. I attach compared image on 18.10.

Top: original config
Middle: Mohammad's patch: Use embedded font for example "生み出された".
Bottom: Gunnar's patch: Looks the same as like original config.

Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for confirming! I have uploaded the fix to disco and bionic.

description: updated
Changed in language-selector (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
status: Confirmed → Fix Committed
Changed in language-selector (Ubuntu Bionic):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Medium
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package language-selector - 0.194

---------------
language-selector (0.194) disco; urgency=medium

  * fontconfig/69-language-selector-ja.conf:
    Refer to font family more precisely, to prevent that rendering
    using other fonts is affected unintentionally (LP: #1823461).

 -- Gunnar Hjalmarsson <email address hidden> Sun, 07 Apr 2019 16:16:00 +0200

Changed in language-selector (Ubuntu):
status: Fix Committed → Fix Released

Hello Mohammad, or anyone else affected,

Accepted language-selector into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/language-selector/0.188.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in language-selector (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Gunnar Hjalmarsson (gunnarhj) wrote :

I installed language-selector-[gnome,common] 0.188.2 from bionic-proposed and verified the test case.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic

I've tested the fix and it works fine.

The verification of the Stable Release Update for language-selector has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package language-selector - 0.188.2

---------------
language-selector (0.188.2) bionic-proposed; urgency=medium

  * fontconfig/69-language-selector-ja.conf:
    Refer to font family more precisely, to prevent that rendering
    using other fonts is affected unintentionally (LP: #1823461).

 -- Gunnar Hjalmarsson <email address hidden> Sun, 07 Apr 2019 16:18:00 +0200

Changed in language-selector (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers