Closed
Bug 2080319
Opened 1 month ago
Closed 1 month ago
Preserve font file path from UnscaledFontDWrite::CreateFromFontDescriptor.
Categories
(Core :: Graphics: Text, defect)
Core
Graphics: Text
Tracking
()
RESOLVED
FIXED
160 Branch
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(1 external file)
No description provided.
| Assignee | ||
Comment 1•1 month ago
|
||
With this patch, the 150-page html spec print takes 62.6s with SkGDI, and gives a 9.7 MB PDF, against 184 s / 100 MB without, and cairo's 97.8 s / 84.8 MB.
| Assignee | ||
Comment 2•1 month ago
|
||
So that they survive record+replay properly.
I found this while debugging why some PDFs were larger / slower with
SkGDI vs. Cairo, and this is what was going on:
- Content records system fonts like Arial by descriptor (path).
- PrintTranslator replays that in the parent through
UnscaledFontDWrite::CreateFromFontDescriptor, which creates the font
with mFont = nullptr, and no path (this is what the assign() call in
this patch fixes). - When the parent re-records into our DrawTargetRecording,
GetFontDescriptor bails out on !mFont, so Arial gets serialized as
RecordedFontData instead (the whole font file). - Replaying that in the parent goes through OTS, since
RecordedFontData::PlayEvent sanitizes when XRE_IsParentProcess(), and
that causes the check that goes from GDI font to LOGFONT to fail,
because of a different fontDirectionHint that OTS puts in.
Thus the fonts were painted as outlines rather than using the faster
native GDI calls.
Updated•1 month ago
|
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/aebd2b6b2419
https://hg.mozilla.org/integration/autoland/rev/3d7d111337ad
Preserve font file path from UnscaledFontDWrite::CreateFromFontDescriptor. r=lsalzman
Comment 4•1 month ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
status-firefox160:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
Updated•26 days ago
|
QA Whiteboard: [qa-triage-done-c161/b160]
You need to log in
before you can comment on or make changes to this bug.
Description
•