mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Set the text fields font size based on their height
- right now we're using the font size from the pdf itself but we use an other font in the annotation layer. So this size doesn't really make sense and leads to bad rendering (see pdf in #14928); - use a sans-serif font for the fields containing text (fix issue #14736); - remove useless padding in text-based fields (fix issue #14301); - text fields allow/disallow scrolling bars (see bit 24 in Ff entry), so use this value to hide/show scrollbars in annotation layer.
This commit is contained in:
parent
5b3fdee5f5
commit
9d82106d20
7 changed files with 104 additions and 47 deletions
|
@ -18,6 +18,10 @@ import "./compatibility.js";
|
|||
const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
|
||||
const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
|
||||
|
||||
// Represent the percentage of the height of a single-line field over
|
||||
// the font size. Acrobat seems to use this value.
|
||||
const LINE_FACTOR = 1.35;
|
||||
|
||||
/**
|
||||
* Refer to the `WorkerTransport.getRenderingIntent`-method in the API, to see
|
||||
* how these flags are being used:
|
||||
|
@ -1162,6 +1166,7 @@ export {
|
|||
isArrayBuffer,
|
||||
isArrayEqual,
|
||||
isAscii,
|
||||
LINE_FACTOR,
|
||||
MissingPDFException,
|
||||
objectFromMap,
|
||||
objectSize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue