Closed Bug 764805 Opened 10 years ago Closed 10 years ago

user fonts with src:local don't handle style descriptors properly under GDI


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

Windows XP
Not set





(Reporter: jfkthame, Assigned: jfkthame)




(3 files, 1 obsolete file)

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)
Here's a reftest for the src:local styling issue; pushing to tryserver to see what happens across platforms.
Attachment #633123 - Flags: review?(jdaggett)
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)
This still doesn't handle all cases correctly:

The regular-as-italic case is incorrect when tested on XP.
It looked correct when I tried it (see attached). And the reftest passed tryserver. Could you give more specifics of the failure you see?
Ok, my bad, I was testing with a profile with some funky settings in it.  With a new profile looks fine.
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+
Attachment #633122 - Flags: review?(jdaggett) → review+
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.
Assignee: nobody → jfkthame
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.