Closed Bug 1458004 Opened 6 years ago Closed 6 years ago

Link font-style values italic / oblique to the appropriate variation-font axes or synthetic styling

Categories

(Core :: Layout: Text and Fonts, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

font-style:italic should use an italic face if available, or set the 'ital' variation to 1.0 if present; or use a 14° synthetic-slant as fallback.

font-style:oblique should use a face declared as oblique, or set the 'slnt' axis to the specified value (default 14); or use a synthetic slant of the specified angle.

(In both cases, synthetic slant is only used if font-synthesis includes the 'style' value.)
Blocks: css-fonts-4
No longer blocks: 1435692
This will build on top of the font-weight handling from bug 1449605.
Blocks: 1449605
No longer blocks: 1449605
Depends on: 1449605
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment on attachment 8972139 [details] [diff] [review]
Link font-style values italic / oblique to the appropriate variation-font axes or synthetic styling

Review of attachment 8972139 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/thebes/gfxFontEntry.cpp
@@ +1133,5 @@
> +    if (!mCheckedForVariationAxes) {
> +        CheckForVariationAxes();
> +    }
> +
> +    return (mRangeFlags & RangeFlags::eItalicVariation) ==

You don't need the ==. If you're worried about this being misread you could write it as the following which I think is a bit more readable:

  return bool(mRangeFlags & RangeFlags::eItalicVariation);

::: gfx/thebes/gfxFontEntry.h
@@ +662,5 @@
> +{
> +    return SlantStyle().Max().IsItalic() ||
> +           ((mRangeFlags & RangeFlags::eAutoSlantStyle) ==
> +               RangeFlags::eAutoSlantStyle &&
> +            HasItalicVariation());

Again, I'd prefer not to have the == personally.
Attachment #8972139 - Flags: review?(jwatt) → review+
Priority: -- → P2
Blocks: 1460259
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/18cf597d218b
Link font-style values italic / oblique to the appropriate variation-font axes or synthetic styling. r=jwatt
https://hg.mozilla.org/mozilla-central/rev/18cf597d218b
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: