Closed Bug 1884314 Opened 7 months ago Closed 7 months ago

IOSPlatformFontList::InitSystemFontNames and IOSPlatformFontList::GetDefaultFontForPlatform return empty strings

Categories

(Core :: Graphics: Text, defect)

Unspecified
iOS
defect

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: glandium, Assigned: jfkthame)

References

Details

(Keywords: perf-alert)

Attachments

(1 file, 1 obsolete file)

No description provided.

For some reason the font descriptors don't have font family attributes,
but creating a UIFont from the descriptor gives us an object that
contains one.

I think a better alternative may be to move to Core Text APIs rather than trying to use UIFont, given that it apparently doesn't work in content processes.

I've got a patch that moves the macOS system & default font lookups from gfxMacPlatformFontList (using Cocoa APIs) to the base CoreTextFontList class (using CT APIs), and AFAICS this ought to work for iOS as well at that point, though I don't currently have an iOS build set up to test this.

Basing the system-font lookup on Core Text APIs rather than Cocoa should mean that it works
for both macOS and iOS, instead of needing separate NSFont- and UIFont-based versions.

(Eventually we should also make this respect the content language, instead of just using
the system language. That will mean "the system font" and "the default font" are no longer
single families but potentially language-dependent.)

Attachment #9390104 - Attachment is obsolete: true
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2eb94605fca6 Move more macOS system font code into CoreTextFontList, reduce dependency on Cocoa APIs. r=glandium,gfx-reviewers,lsalzman
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
Regressions: 1884909

(In reply to Pulsebot from comment #4)

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2eb94605fca6
Move more macOS system font code into CoreTextFontList, reduce dependency on
Cocoa APIs. r=glandium,gfx-reviewers,lsalzman

== Change summary for alert #41858 (as of Mon, 18 Mar 2024 19:51:10 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
11% welcome loadtime macosx1015-64-shippable-qr cold fission webrender 57.42 -> 51.30 Before/After
10% welcome loadtime macosx1015-64-shippable-qr cold fission webrender 57.00 -> 51.30 Before/After

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=41858

Keywords: perf-alert
Assignee: mh+mozilla → jfkthame
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: