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

RESOLVED FIXED in mozilla16



7 years ago
7 years ago


(Reporter: jfkthame, Assigned: jfkthame)


Windows XP

Firefox Tracking Flags

(Not tracked)



(3 attachments, 1 obsolete attachment)



7 years ago
Created attachment 633122 [details] [diff] [review]
patch, fix handling of src:local style properties in the GDI backend

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)

Comment 1

7 years ago
Created attachment 633123 [details] [diff] [review]
reftest for src:local fonts with mismatched style properties

Here's a reftest for the src:local styling issue; pushing to tryserver to see what happens across platforms.
Attachment #633123 - Flags: review?(jdaggett)

Comment 2

7 years ago
Created attachment 633135 [details] [diff] [review]
reftest for src:local fonts with mismatched style properties

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.

Comment 4

7 years ago
Created attachment 636662 [details]
jdaggett's synth-italic testcase 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+


7 years ago
Attachment #633122 - Flags: review?(jdaggett) → review+

Comment 7

7 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.


7 years ago
Assignee: nobody → jfkthame
Target Milestone: --- → mozilla16
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.