4

I am filling out this PDF form, IRS Form 1040, in evince 3.36.7 on Ubuntu 20.04 and having a problem that the numbers I input are not aligned correctly with the background bars. Please see this screenshot: Form 1040, DejaVu In the box filled by 123456789, the correct rendering should look like 123|45|6789, but 5 is almost pushed out to the right of the second vertical bar. The spacing between the numbers are much wider than the form creator intended.

It looks that Helvetica LT Std Bold font is assigned to this box, but I don't have this font. Ubuntu substituted it with DejaVu Sans Bold.

I installed MS Core Fonts and changed the substitution with Arial Bold by editing fonts.conf file. However, the spacing did not change. (Screenshot not shown.)

I also tried filling and rendering the form in firefox, chrome, and okular, but they had the same spacing problem.

I think this problem have the same root as the issue reported in these posts.

The issue there has not been resolved for a several years, and it looks difficult to resolve it.

I would like to know any workarounds for this particular PDF form. Is it possible to specify substitution font size (to compensate the too-wide spacing)? Is there a PDF viewer that works? Should I buy the font?

Do Windows and Mac not have this problem? (If so why? Isn't this essentially a problem of fonts? I guess Helvetica LT may not be on so many Windows or Mac computers.) If they work, does wine or virtualbox work?


Edit

The fonts used in the PDF are as following. Among them, the fonts for the input fields are Zapf Dingbats, Helvetica, and Helvetica LT Std Bold. I believe the numbers in question is Helvetica LT Std Bold.

$ pdffonts f1040_ssn_sample.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
WVBKSB+UniversalStd-NewswithCommPi   CID Type 0C       Identity-H       yes yes yes   1193  0
XULQGZ+ZapfDingbatsStd               CID Type 0C       Identity-H       yes yes yes   1198  0
TGPSCH+HelveticaNeueLTStd-Roman      Type 1C           WinAnsi          yes yes no    1200  0
ZHOHIV+HelveticaNeueLTStd-BlkCn      Type 1C           WinAnsi          yes yes no    1202  0
XEPVGZ+HelveticaNeueLTStd-BdOu       Type 1C           WinAnsi          yes yes no    1204  0
XEPVGZ+HelveticaNeueLTStd-Blk        Type 1C           WinAnsi          yes yes no    1206  0
CEYUYP+ITCFranklinGothicStd-Demi     Type 1C           WinAnsi          yes yes no    1208  0
UXBDQF+HelveticaNeueLTStd-Bd         Type 1C           WinAnsi          yes yes no    1210  0
UXBDQF+HelveticaNeueLTStd-BdCn       Type 1C           WinAnsi          yes yes no    1212  0
ATBIWT+HelveticaNeueLTStd-It         Type 1C           WinAnsi          yes yes no    1214  0
Helvetica                            Type 1            WinAnsi          no  no  no     143  0
HelveticaLTStd-Bold                  Type 1            WinAnsi          no  no  no     144  0
ZapfDingbats                         Type 1            ZapfDingbats     no  no  no    1114  0
ZHOHIV+AdobePiStd                    CID Type 0C       Identity-H       yes yes yes     69  0
norio
  • 171
  • 1
  • 8

2 Answers2

3

A very similar issue was found to be a fontconfig bug, and was fixed in Ubuntu 21.04 and also upstream.

So possibly, on 20.04, it's sufficient to open /etc/fonts/conf.avail/45-latin.conf for editing and add this snippet:

<alias>
    <family>Courier Std</family>
    <default><family>monospace</family></default>
</alias>
2

One option that might work for you is to grab a copy of the Helvetica .dfont file, convert it to a .ttf, and copy it to your fonts directory.

The gist goes like this:

  1. Install fondu
    sudo apt install fondu
    
  2. Download the Helvetica.dfont file from this helpful GitHub repository
  3. Convert the font:
    fondu Helvetica.dfont
    
  4. Open the resulting .ttf using the FontViewer application. This is easiest by double-clicking the font file in Nautilus.
  5. Click the “Install” button in the upper-right corner

Hopefully this will give you a better-spaced font.

matigo
  • 24,752
  • 7
  • 50
  • 79