mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Italic angle is defined clockwise in CSS when it's counterclockwise in PDF
This commit is contained in:
parent
f587d5998e
commit
1b0006093d
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue