Working draft: https://www.w3.org/TR/css-fonts-4/#font-style-prop
At the moment it's only supported by Firefox, so it's not really urgent.
Also plays into the font matching algorithm: https://www.w3.org/TR/css-fonts-4/#font-matching-algorithm
Presently font-snapper only works properly with font-style: oblique without an angle. There's a hack in place to avoid crashing:
|
// Hack to treat oblique <angle> as oblique until we add proper support |
|
function removeObliqueAngle(fontStyle) { |
|
if (/^oblique\b/.test(fontStyle)) { |
|
return 'oblique'; |
|
} else { |
|
return fontStyle; |
|
} |
|
} |
Once implemented, add to the fuzz tests by switching to headless Firefox and removing:
|
if (/oblique/.test(propsToSnap['font-style'])) { |
|
propsToSnap['font-style'] = 'oblique'; |
|
} |
|
if (/oblique/.test(fontFaceDeclaration['font-style'])) { |
|
fontFaceDeclaration['font-style'] = 'oblique'; |
|
} |
Working draft: https://www.w3.org/TR/css-fonts-4/#font-style-prop
At the moment it's only supported by Firefox, so it's not really urgent.
Also plays into the font matching algorithm: https://www.w3.org/TR/css-fonts-4/#font-matching-algorithm
Presently font-snapper only works properly with
font-style: obliquewithout an angle. There's a hack in place to avoid crashing:font-snapper/lib/fontSnapper.js
Lines 7 to 14 in 905eb49
Once implemented, add to the fuzz tests by switching to headless Firefox and removing:
font-snapper/test/fuzz.js
Lines 151 to 153 in ae0f479
font-snapper/test/fuzz.js
Lines 166 to 168 in ae0f479