1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +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:
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

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