mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
XFA - Get line height from the font
- when the CSS line-height property is set to 'normal' then the value depends of the user agent. So use a line height based on the font itself and if for any reasons this value is not available use 1.2 as default. - it's a partial fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1717681.
This commit is contained in:
parent
9441245320
commit
e82446fa5a
9 changed files with 70 additions and 34 deletions
|
@ -70,12 +70,12 @@ import {
|
|||
createWrapper,
|
||||
fixDimensions,
|
||||
fixTextIndent,
|
||||
getFonts,
|
||||
isPrintOnly,
|
||||
layoutClass,
|
||||
layoutText,
|
||||
measureToString,
|
||||
setAccess,
|
||||
setFontFamily,
|
||||
setMinMaxDimensions,
|
||||
toStyle,
|
||||
} from "./html_utils.js";
|
||||
|
@ -2695,7 +2695,7 @@ class Font extends XFAObject {
|
|||
style.fontSize = fontSize;
|
||||
}
|
||||
|
||||
style.fontFamily = getFonts(this.typeface, this[$globalData].fontFinder);
|
||||
setFontFamily(this, this[$globalData].fontFinder, style);
|
||||
|
||||
if (this.underline !== 0) {
|
||||
style.textDecoration = "underline";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue