1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-28 23:28:16 +02:00

XFA - Support non-embedded fonts without a Widths entry

- some pdf use some fonts which are not embedded or they don't have any width array or don't have any css info (e.g. for standard fonts or Arial).
  - so add widths arrays for Liberation fonts in order to compute the ones for other fonts in using scale factors array.
This commit is contained in:
Calixte Denizet 2021-06-28 19:03:47 +02:00
parent ff3a5382ee
commit 70bb672dcd
11 changed files with 464 additions and 59 deletions

View file

@ -2665,6 +2665,11 @@ class Font extends XFAObject {
this.fill = null;
}
[$clean](builder) {
super[$clean](builder);
this[$globalData].usedTypefaces.add(this.typeface);
}
[$toStyle]() {
const style = toStyle(this, "fill");
const color = style.color;