Open Bug 1303580 Opened 8 years ago Updated 2 years ago

`font-style: oblique` should not use italic version of the face

Categories

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

47 Branch
defect

Tracking

()

People

(Reporter: u174286, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36

Steps to reproduce:

1. Create HTML document that has `p` element with `font-family: Meiryo, sans-serif; font-style: oblique`
2. Open with Firefox



Actual results:

The `p` element is rendered with italic version of Meiryo.


Expected results:

The `p` element should be rendered with pseudo-oblique version of Meiryo, because Meiryo does not have oblique version.

Spec says: A value of 'normal' selects a font that is classified as 'normal' in the UA's font database, while 'oblique' selects a font that is labeled 'oblique'. A value of 'italic' selects a font that is labeled 'italic', or, if that is not available, one labeled 'oblique'. (https://www.w3.org/TR/CSS2/fonts.html#font-styling)

`normal` uses normal version, `italic` uses italic or oblique version, but `oblique` uses oblique version only.

Sidenote: Chrome and Edge are compatible with spec. IE11 is same as Firefox 47.
Component: Untriaged → Layout: Text
Product: Firefox → Core
(In reply to hail2u@gmail.com from comment #0)
> Spec says: A value of 'normal' selects a font that is classified as 'normal'
> in the UA's font database, while 'oblique' selects a font that is labeled
> 'oblique'. A value of 'italic' selects a font that is labeled 'italic', or,
> if that is not available, one labeled 'oblique'.
> (https://www.w3.org/TR/CSS2/fonts.html#font-styling)

For a more recent version of the spec, see CSS Fonts level 3, where font-style says:

# Values have the following meanings:
# 
# normal
#     selects a face that is classified as a normal face, one that is neither italic or obliqued 
# italic
#     selects a font that is labeled as an italic face, or an oblique face if one is not 
# oblique
#     selects a font that is labeled as an oblique face, or an italic face if one is not 

(see https://www.w3.org/TR/css-fonts-3/#propdef-font-style)

Note that this -does- call for use of an 'italic' face as fallback when 'oblique' is not present. Therefore, IE11 and Firefox are in conformance with the current spec, while Chrome and Edge are following the older CSS2 spec.

However, I'd encourage you to raise this as an issue with the CSS Working Group (e.g by email to www-style@w3.org, or by opening an issue at https://github.com/w3c/csswg-drafts/tree/master/css-fonts), as I think it would actually be preferable for the browser to synthesize an oblique face when 'oblique' is requested, rather than using an italic face.
(In reply to Jonathan Kew (:jfkthame) from comment #1)
> However, I'd encourage you to raise this as an issue with the CSS Working
> Group (e.g by email to www-style@w3.org, or by opening an issue at
> https://github.com/w3c/csswg-drafts/tree/master/css-fonts), as I think it
> would actually be preferable for the browser to synthesize an oblique face
> when 'oblique' is requested, rather than using an italic face.

Never mind, I raised the question. This is now https://github.com/w3c/csswg-drafts/issues/514.
Priority: -- → P3
The CSSWG just resolved on this that "the fallback list for oblique is synth oblique, italic, roman, next font. The synth step is skipped if font-synthesis is turned off".
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: