mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-28 23:28:16 +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
|
@ -24,6 +24,13 @@ const dimConverters = {
|
|||
};
|
||||
const measurementPattern = /([+-]?[0-9]+\.?[0-9]*)(.*)/;
|
||||
|
||||
function stripQuotes(str) {
|
||||
if (str.startsWith("'") || str.startsWith('"')) {
|
||||
return str.slice(1, str.length - 1);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function getInteger({ data, defaultValue, validate }) {
|
||||
if (!data) {
|
||||
return defaultValue;
|
||||
|
@ -206,4 +213,5 @@ export {
|
|||
getRelevant,
|
||||
getStringOption,
|
||||
HTMLResult,
|
||||
stripQuotes,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue