mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Ensure that all Font
instances have the vertical
property set to a boolean
Given that the `vertical` property is always accessed on the main-thread, ensuring that the property is explicitly defined seems like the correct thing to do since it also avoids boolean casting elsewhere in the code-base.
This commit is contained in:
parent
c5e1fd3fde
commit
59f54b946d
2 changed files with 2 additions and 2 deletions
|
@ -1761,7 +1761,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
fontFamily: font.fallbackName,
|
||||
ascent: font.ascent,
|
||||
descent: font.descent,
|
||||
vertical: !!font.vertical,
|
||||
vertical: font.vertical,
|
||||
};
|
||||
}
|
||||
textContentItem.fontName = font.loadedName;
|
||||
|
|
|
@ -607,7 +607,7 @@ var Font = (function FontClosure() {
|
|||
}
|
||||
|
||||
this.cidEncoding = properties.cidEncoding;
|
||||
this.vertical = properties.vertical;
|
||||
this.vertical = !!properties.vertical;
|
||||
if (this.vertical) {
|
||||
this.vmetrics = properties.vmetrics;
|
||||
this.defaultVMetrics = properties.defaultVMetrics;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue