Bug 60836 - Letters in auto-font-size PDF form fields get cut off
Summary: Letters in auto-font-size PDF form fields get cut off
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-14 11:56 UTC by Jose Aliste
Modified: 2018-08-21 10:36 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
test case (241.46 KB, text/plain)
2013-02-14 11:56 UTC, Jose Aliste
Details
Hardcode a reasonable default max font size for form fields if autosize=on (3.60 KB, patch)
2016-10-09 20:50 UTC, Carl-Daniel Hailfinger
Details | Splinter Review
Another example (925.27 KB, application/pdf)
2017-10-10 19:24 UTC, Ben Roberts
Details
Screenshot of a worse example in evince (90.68 KB, image/png)
2017-10-10 19:26 UTC, Ben Roberts
Details

Description Jose Aliste 2013-02-14 11:56:07 UTC
Created attachment 74805 [details]
test case

From GNOME's bugzilla. 

"When filling a PDF form with fields that are set to auto-size the fonts to make
them fit the box evince cuts the letters by the base-line. This makes letters
like y, g and j get cut off. The proper behaviour should be to resize the font
in a manner that lets both ends of the most protuding letters fit at all times.

View the attached screenshot and pdf."
Comment 1 Carl-Daniel Hailfinger 2016-10-09 20:50:37 UTC
Created attachment 127154 [details] [review]
Hardcode a reasonable default max font size for form fields if autosize=on

This patch solves the immediate problem for me, but obviously hardcoding a max font size of 12 for all form fields with unspecified font size is not optimal for everyone. Options are either a setting per form field, or a global setting. Given that most forms are designed for uniform font size, a global setting is probably sufficient and would allow for a simple UI.

If anyone knows poppler well enough to make this max form font size a settable attribute of the document instead of a hardcoded constant in two functions, please tell me.
Comment 2 Ben Roberts 2017-10-10 19:24:37 UTC
Created attachment 134780 [details]
Another example

This has been bothering me for about two years now, both because of cut-off letters and aesthetics. I deal with many forms using evince that seem to use auto-size text fields and each field varies with how huge the text gets based on exactly what the input is. It would be better aesthetically if a reasonable max size was chosen.

I'm attaching a publicly available test case PDF, and a screenshot of a much worse example (I shouldn't redistribute that PDF, and it's just a more extreme case of the same bug). Someone who can run Adobe Reader should see how it handles the same PDFs for inspiration; I will give this a try in Wine.
Comment 3 Ben Roberts 2017-10-10 19:26:25 UTC
Created attachment 134781 [details]
Screenshot of a worse example in evince
Comment 4 GitLab Migration User 2018-08-21 10:36:35 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/284.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.