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:
Jonas Jenwald 2020-04-01 13:40:35 +02:00
parent c5e1fd3fde
commit 59f54b946d
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;