Closed
Bug 764805
Opened 13 years ago
Closed 13 years ago
user fonts with src:local don't handle style descriptors properly under GDI
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
Attachments
(3 files, 1 obsolete file)
2.06 KB,
patch
|
jtd
:
review+
|
Details | Diff | Splinter Review |
3.00 KB,
patch
|
jtd
:
review+
|
Details | Diff | Splinter Review |
107.90 KB,
image/png
|
Details |
As noted in bug 754452 comment 27, the GDI back-end doesn't correctly handle the case where a regular face is loaded with src:local() and given an italic (or bold) descriptor. The associated style property will be set in the LOGFONT for the font entry, which results in GDI actually using the styled face (or applying its own synthetic styling) rather than using the intended regular face.
This patch fixes the issue by using the properties of the original platform font entry when creating the new user font entry, so that the resulting LOGFONT will match, and then updating the style properties to match the proxy, which has the values from the @font-face rule.
Attachment #633122 -
Flags: review?(jdaggett)
Assignee | ||
Comment 1•13 years ago
|
||
Here's a reftest for the src:local styling issue; pushing to tryserver to see what happens across platforms.
Attachment #633123 -
Flags: review?(jdaggett)
Assignee | ||
Comment 2•13 years ago
|
||
Oops, it won't work with typos in the reftest manifest! :( Trying again...
Attachment #633123 -
Attachment is obsolete: true
Attachment #633123 -
Flags: review?(jdaggett)
Attachment #633135 -
Flags: review?(jdaggett)
Comment 3•13 years ago
|
||
This still doesn't handle all cases correctly:
http://people.mozilla.org/~jdaggett/tests/synthetic-italics-tests.html
The regular-as-italic case is incorrect when tested on XP.
Assignee | ||
Comment 4•13 years ago
|
||
It looked correct when I tried it (see attached). And the reftest passed tryserver. Could you give more specifics of the failure you see?
Comment 5•13 years ago
|
||
Ok, my bad, I was testing with a profile with some funky settings in it. With a new profile looks fine.
Comment 6•13 years ago
|
||
Comment on attachment 633135 [details] [diff] [review]
reftest for src:local fonts with mismatched style properties
Looks fine but we should have a bug for the Android failures. Or simply include Droid Sans/Roboto in the set of fonts used.
Attachment #633135 -
Flags: review?(jdaggett) → review+
Updated•13 years ago
|
Attachment #633122 -
Flags: review?(jdaggett) → review+
Assignee | ||
Comment 7•13 years ago
|
||
I tried adding Droid Sans and Roboto, but the test still fails - the problem with both this and the existing local-1 testcase is that src:local(...) is completely broken on Android, so the user fonts don't get used at all. Filed bug 769194 to deal with this.
Pushed to inbound, with Droid Sans/Roboto added to the tests, but they still won't pass until 769194 is fixed.
https://hg.mozilla.org/integration/mozilla-inbound/rev/2ab61c8b46d8
https://hg.mozilla.org/integration/mozilla-inbound/rev/367d0809c8f9
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → jfkthame
Target Milestone: --- → mozilla16
Comment 8•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2ab61c8b46d8
https://hg.mozilla.org/mozilla-central/rev/367d0809c8f9
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•