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."
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.
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.
Created attachment 134781 [details] Screenshot of a worse example in evince
-- 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.