1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

XFA - Fix auto-sized fields (bug 1722030)

- In order to better compute text fields size, use line height with no gaps (and consequently guessed height for text are slightly better in general).
  - Fix default background color in fields.
This commit is contained in:
Calixte Denizet 2021-07-27 18:43:05 +02:00
parent 336a74a0e5
commit 76d882b560
14 changed files with 311 additions and 162 deletions

View file

@ -3924,7 +3924,7 @@ class PartialEvaluator {
const standardFontName = getXfaFontName(fontName.name);
if (standardFontName) {
cssFontInfo.fontFamily = `${cssFontInfo.fontFamily}-PdfJS-XFA`;
cssFontInfo.lineHeight = standardFontName.lineHeight || null;
cssFontInfo.metrics = standardFontName.metrics || null;
glyphScaleFactors = standardFontName.factors || null;
fontFile = await this.fetchStandardFontData(standardFontName.name);
isInternalFont = !!fontFile;