implement support for font-synthesis

RESOLVED FIXED in mozilla33

Status

()

Core
Graphics: Text
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: jtd, Assigned: jfkthame)

Tracking

({dev-doc-complete})

Trunk
mozilla33
dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 2 obsolete attachments)

(Reporter)

Description

5 years ago
Followup work from the font-variant bug.  Parsing of the 'font-synthesis' property has been implemented but the support for it within gfx code needs to be added.
(Assignee)

Comment 1

4 years ago
I'm proposing to steal this bug, as I have some WIP here (prompted by discussion in bug 1023702). I'll post some patches shortly.
Assignee: jdaggett → jfkthame
Blocks: 1023702
(Assignee)

Comment 2

4 years ago
Created attachment 8439854 [details] [diff] [review]
part 1 - pass the font-synthesis flags down to gfxFontStyle.
(Assignee)

Comment 3

4 years ago
Created attachment 8439855 [details] [diff] [review]
part 2 - support font-synthesis options through the platform-font-list backends.
(Assignee)

Comment 4

4 years ago
Created attachment 8439856 [details] [diff] [review]
part 3 - support font-synthesis options through the fontconfig backend.
(Assignee)

Comment 5

4 years ago
Created attachment 8439857 [details] [diff] [review]
part 4 - reftests for the font-synthesis property.
(Assignee)

Comment 6

4 years ago
Created attachment 8440250 [details] [diff] [review]
part 2 - support font-synthesis options through the platform-font-list backends.
(Assignee)

Updated

4 years ago
Attachment #8439855 - Attachment is obsolete: true
(Assignee)

Updated

4 years ago
Attachment #8439854 - Flags: review?(jdaggett)
(Assignee)

Updated

4 years ago
Attachment #8440250 - Flags: review?(jdaggett)
(Assignee)

Updated

4 years ago
Attachment #8439856 - Flags: review?(jdaggett)
(Assignee)

Updated

4 years ago
Attachment #8439857 - Flags: review?(jdaggett)
(Assignee)

Comment 7

4 years ago
Tryserver run:
https://tbpl.mozilla.org/?tree=Try&rev=c20e427ac9b3

And after fixing the Windows build failure there (thanks to copy/paste fail):
https://tbpl.mozilla.org/?tree=Try&rev=11dd2fda7f98
(Reporter)

Comment 8

4 years ago
Comment on attachment 8439854 [details] [diff] [review]
part 1 - pass the font-synthesis flags down to gfxFontStyle.

:::gfx/thebes/gfxFont.cpp
@@ -141,16 +142,20 @@ struct gfxFontStyle {
+    // Whether synthetic styles are allowed
+    bool syntheticWeight : 1;
+    bool syntheticStyle : 1;

Think these need to be named 'allowSynthetic...' so that it's clear this isn't saying that the weight/style *are* synthetic.
(Reporter)

Comment 9

4 years ago
Comment on attachment 8440250 [details] [diff] [review]
part 2 - support font-synthesis options through the platform-font-list backends.

r+ with name change to syntheticWeight/syntheticStyle
Attachment #8440250 - Flags: review?(jdaggett) → review+
(Reporter)

Updated

4 years ago
Attachment #8439856 - Flags: review?(jdaggett) → review+
(Assignee)

Comment 10

4 years ago
Created attachment 8442179 [details] [diff] [review]
part 1 - pass the font-synthesis flags down to gfxFontStyle.

I agree with the rename to allowSynthetic{Weight,Style}. I'd intended to do this, but forgot to do it before I posted the patches.
Attachment #8442179 - Flags: review?(jdaggett)
(Assignee)

Updated

4 years ago
Attachment #8439854 - Attachment is obsolete: true
Attachment #8439854 - Flags: review?(jdaggett)
(Reporter)

Updated

4 years ago
Attachment #8442179 - Flags: review?(jdaggett) → review+
(Reporter)

Comment 11

4 years ago
Comment on attachment 8439857 [details] [diff] [review]
part 4 - reftests for the font-synthesis property.

Hello cruel world indeed...
Attachment #8439857 - Flags: review?(jdaggett) → review+

Comment 14

4 years ago
Can we mark this approval?/+ for 2.0 uplift?
(In reply to Stephany Wilkes from comment #14)
> Can we mark this approval?/+ for 2.0 uplift?

Why?  Uplifting new features is extremely exceptional; they should generally ride the trains to release.
Flags: needinfo?(swilkes)

Comment 16

4 years ago
Got it. We're just gunning to get this in to fix RTL issues but it is large, needs bake time, and can ride the trains (per chat with Bhavana in IRC). Thanks David!
Flags: needinfo?(swilkes)
I don't see any MDN documentation on this feature.
Keywords: dev-doc-needed
Depends on: 1046491
You need to log in before you can comment on or make changes to this bug.