Italic angle is defined clockwise in CSS when it's counterclockwise in PDF
This commit is contained in:
parent
f587d5998e
commit
1b0006093d
@ -901,7 +901,11 @@ class PDFDocument {
|
||||
}
|
||||
const fontFamily = descriptor.get("FontFamily");
|
||||
const fontWeight = descriptor.get("FontWeight");
|
||||
const italicAngle = descriptor.get("ItalicAngle");
|
||||
|
||||
// Angle is expressed in degrees counterclockwise in PDF
|
||||
// when it's clockwise in CSS
|
||||
// (see https://drafts.csswg.org/css-fonts-4/#valdef-font-style-oblique-angle)
|
||||
const italicAngle = -descriptor.get("ItalicAngle");
|
||||
const cssFontInfo = { fontFamily, fontWeight, italicAngle };
|
||||
|
||||
if (!validateCSSFont(cssFontInfo)) {
|
||||
|
Loading…
Reference in New Issue
Block a user