You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "simon steiner (JIRA)" <ji...@apache.org> on 2018/05/16 12:59:00 UTC

[jira] [Resolved] (FOP-687) referencing a custom font (TTF or Adobe Type 1) for a pdf document fails witch fop-0.20.4

     [ https://issues.apache.org/jira/browse/FOP-687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

simon steiner resolved FOP-687.
-------------------------------
    Resolution: Invalid

> referencing a custom font (TTF or Adobe Type 1) for a pdf document fails witch fop-0.20.4
> -----------------------------------------------------------------------------------------
>
>                 Key: FOP-687
>                 URL: https://issues.apache.org/jira/browse/FOP-687
>             Project: FOP
>          Issue Type: Bug
>          Components: unqualified
>    Affects Versions: 0.20.4
>         Environment: Operating System: All
> Platform: PC
> URL: http://marc.theaimsgroup.com/?l=fop-user&m=105696996918699&w=2
>            Reporter: Markus Sch
>
> Fop fails by trying to use a ttf font and reference it within a pdf document.
> I first embedded a True Type Font into my documents. Thats works great. Here is 
> a snippet from my userconfig.xml file:
> <font
> metrics-file="file:D:/Asfr/unchangedfopsrc/fop-0.20.4/conf/ARIALUNI.XML" 
>    kerning="yes" 
>    embed-file="file:D:/Asfr/unchangedfopsrc/fop-0.20.4/conf/ARIALUNI.TTF">
>       <font-triplet name="ArialUnicodeMS" style="normal" weight="normal"/>
>       <font-triplet name="ArialUnicodeMS" style="italic" weight="bold"/>
>       <font-triplet name="ArialUnicodeMS" style="normal" weight="bold"/>
>       <font-triplet name="ArialUnicodeMS" style="italic" weight="normal"/>
> </font>
> But if I remove the embed-file attribute I end up with an error.
> This is my changed userconfig.xml file:
> <font
> metrics-file="file:D:/Asfr/unchangedfopsrc/fop-0.20.4/conf/ARIALUNI.XML" 
>    kerning="yes" 
>       <font-triplet name="ArialUnicodeMS" style="normal" weight="normal"/>
>       <font-triplet name="ArialUnicodeMS" style="italic" weight="bold"/>
>       <font-triplet name="ArialUnicodeMS" style="normal" weight="bold"/>
>       <font-triplet name="ArialUnicodeMS" style="italic" weight="normal"/>
> </font>
> This is the error message I get:
> [INFO] FOP 0.20.4
> [INFO] building formatting object tree
> [ERROR] Failed to read font metrics file
> D:/Asfr/unchangedfopsrc/fop-0.20.4/conf
> /ARIALUNI.XML : null
> [INFO] [1]
> [ERROR] unknown font ArialUnicodeMS,normal,normal so defaulted font to any
> [ERROR] unknown font ArialUnicodeMS,normal,normal so defaulted font to any
> [ERROR] unknown font ArialUnicodeMS,normal,normal so defaulted font to any
> [INFO] [2]
> Please note: I only changed the userconfig.xml. The font-metrics file is
> still there.
> If I use
> <font
> metrics-file="file:D:/Asfr/unchangedfopsrc/fop-0.20.4/conf/ARIALUNI.XML" 
>    kerning="yes" 
>    embed-file=""
>       <font-triplet name="ArialUnicodeMS" style="normal" weight="normal"/>
>       <font-triplet name="ArialUnicodeMS" style="italic" weight="bold"/>
>       <font-triplet name="ArialUnicodeMS" style="normal" weight="bold"/>
>       <font-triplet name="ArialUnicodeMS" style="italic" weight="normal"/>
> </font>
> fop generates the pdf document, but with this error message at the end:
> [INFO] Parsing of document complete, stopping renderer
> [ERROR] Failed to embed font [65] ArialUnicodeMS:
> D:\Asfr\unchangedfopsrc\fop-0.
> 20.4 (Access is denied)
> I can open the pdf document, but I get the error message "A font required
> for font substitution is missing".
> And if I use the following in my userconfig.xml I end up with the same error
> message as the one above.
> <font
> metrics-file="file:D:/Asfr/unchangedfopsrc/fop-0.20.4/conf/ARIALUNI.XML" 
>    kerning="yes" 
>    embed-file="*.ttf"
>       <font-triplet name="ArialUnicodeMS" style="normal" weight="normal"/>
>       <font-triplet name="ArialUnicodeMS" style="italic" weight="bold"/>
>       <font-triplet name="ArialUnicodeMS" style="normal" weight="bold"/>
>       <font-triplet name="ArialUnicodeMS" style="italic" weight="normal"/>
> </font>
> I'm using jdk 1.4.0.
> I also tested this with fop-0.20.5rc3a and it seems that the issue has been 
> fixed for Adobe Type 1 fonts. But with True Type fonts it still doesn't work. 
> Just the fop error messages are different with 0.20.5rc3a.
> I tested the issue with arialuni.ttf and tahoma.ttf



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)