Closed Bug 1648085 Opened 4 years ago Closed 4 years ago

Localized font-family name not recognized with shared font-list enabled on Linux [was: fontconfig font replacement doesn't work anymore]

Categories

(Core :: Layout: Text and Fonts, defect)

79 Branch
Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox77 --- unaffected
firefox78 --- unaffected
firefox79 --- disabled
firefox80 --- disabled

People

(Reporter: lilydjwg, Assigned: jfkthame)

References

(Depends on 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0

Steps to reproduce:

I have this in my fontconfig setting to replace Simsun with 文泉驿正黑 (before bug 1573135 I only did this with small font size because large text in Simsun looks OK).

<match target="pattern">
<test name="family">
<string>Simsun</string>
</test>
<edit binding="strong" mode="prepend" name="family">
<string>文泉驿正黑</string>
</edit>
</match>

Open a traditional Chinese site made for the Windows XP era, e.g. https://tech.sina.com.cn/roll/2020-01-13/doc-iihnzahk3837265.shtml

Actual results:

Simsun is used.

Expected results:

文泉驿正黑 should be used.

82:02.34 INFO: Last good revision: a0af6d53c082d97a83c9c0891c36e35331330880
82:02.34 INFO: First bad revision: ed8d5ec80203d89a34e68220e7d8476a22f9b867
82:02.34 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a0af6d53c082d97a83c9c0891c36e35331330880&tochange=ed8d5ec80203d89a34e68220e7d8476a22f9b867

Has Regression Range: --- → yes
Component: Untriaged → Layout: Text and Fonts
Keywords: regression
OS: Unspecified → Linux
Product: Firefox → Core
Regressed by: 1533462
Depends on: 1552941
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true

Set release status flags based on info from the regressing bug 1533462

Ah, I see what's happening here. Your fontconfig substitution rule uses the Chinese font name "文泉驿正黑", but with the shared font list enabled, we only recognize it by its English name "WenQuanYi Zen Hei".

We need to ensure we pick up the proper localized name from fontconfig as well as the English one.

Summary: fontconfig font replacement doesn't work anymore → Localized font-family name not recognized with shared font-list enabled on Linux [was: fontconfig font replacement doesn't work anymore]
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2558442b06ff
Create family entries for any localized font-family names exposed by fontconfig. r=jwatt
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: