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

RESOLVED FIXED in mozilla16

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

unspecified
mozilla16
x86
Windows XP
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

Assignee

Description

7 years ago
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

7 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

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

7 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?
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+

Updated

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

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.
https://hg.mozilla.org/integration/mozilla-inbound/rev/2ab61c8b46d8
https://hg.mozilla.org/integration/mozilla-inbound/rev/367d0809c8f9
Assignee

Updated

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