[ 
https://issues.apache.org/jira/browse/PDFBOX-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14308161#comment-14308161
 ] 

Christer Palm commented on PDFBOX-2661:
---------------------------------------

This is what it looks like for me, I added a Helvetica-BoldOblique field for 
reference.
!Franklin.png!

It sure looks like Helvetica but it's obviously rendered with medium weight. 
FranklinGothic is a sans-serif font though so Helvetica is the obvious 
substitution even for a "smart" substitutor.
Another weird thing is that if I leave the field in Reader the text goes away 
for "Foobar" and "FranklinGothic-MediumItalic" but not "MinionPro-Bold" or 
"Helvetica-BoldOblique".

I think Adobe Readers knowledge about these fonts are table based rather than 
based on font name heuristics, although it could obviously use both approaches. 
That's easy enough to find out by trying Foobar-Bold for example. The reason is 
that if you dump the AcroForm.api plug-in binary you'll find that it contains 
the names of hundreds of fonts (that's where I got FranklinGothic-MediumItalic 
and MinionPro-Bold from in the first place) and I would be surprised if it 
doesn't also know about their characteristics.

But for the scope of this issue it's enough to know that the AP stream is 
created with the shorthand names substituted but otherwise always refers to the 
font name literally. The next level of substitution is up to the renderer.

> Implement font fallback for AcroForms
> -------------------------------------
>
>                 Key: PDFBOX-2661
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2661
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: AcroForm
>    Affects Versions: 1.8.8, 2.0.0
>            Reporter: Maruan Sahyoun
>             Fix For: 2.1.0
>
>         Attachments: FontTest.java, Fonts.pdf, Fonts2.pdf, Franklin.png, 
> field-filled.png, field.png, fonts2-filled.png
>
>
> There are forms where the font specified in the fields default appearance is 
> not pointing to the correct fields or forms resources entry. Adobe 
> Reader/Acrobat have a (unspecified) fallback mechanism to resolve such 
> missing fonts.
> We should be ably to come up with a similar solution.
> A sample of such an issue can be found in PDFBOX-1234



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to