xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Eberhardt <robert.eberha...@werum.de>
Subject WG: POstScrit Fonts
Date Mon, 23 Jan 2012 12:50:17 GMT
Hello,

I used fontforge to convert the ttf file attached to the afm, pfb,and ofm file. Using the
script. Tank you for that.

        <font kerning="yes"
          embed-url="Trade.pfb">
          <font-triplet name="Trade" style="normal" weight="normal"/>
        </font>

I am using the fin tag above and get the following exception.

java.lang.RuntimeException: Cannot parse PFM file. You probably specified the PFB file of
a Type 1 font as parameter instead of the PFM.
        at org.apache.fop.fonts.LazyFont.load(LazyFont.java:139)
        at org.apache.fop.fonts.LazyFont.getAscender(LazyFont.java:233)
        at org.apache.fop.fonts.Font.getAscender(Font.java:96)
        at org.apache.fop.layoutmgr.BlockLayoutManager.initialize(BlockLayoutManager.java:87)
        at  org.apache.fop.layoutmgr.AbstractLayoutManager.getChildLM(AbstractLayoutManager.java:118)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:271)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116)
        at org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:170)
        at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForRowGroup(RowGroupLayoutManager.java:120)
        at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElements(RowGroupLayoutManager.java:60)
        at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:218)
        at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:170)
        at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:246)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:289)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116)
        at org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:170)
        at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForRowGroup(RowGroupLayoutManager.java:120)
        at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElements(RowGroupLayoutManager.java:60)
        at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:226)
        at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:170)
        at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:246)
        at org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:170)
        at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForRowGroup(RowGroupLayoutManager.java:120)
        at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElements(RowGroupLayoutManager.java:60)
        at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:218)
        at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:170)
        at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:246)
        at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:107)
        at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:145)
        at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:552)
        at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:137)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:302)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:264)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106)
        at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234)
        at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:123)
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:340)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169)
        at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
        at org.apache.xml.serializer.TreeWalker.endNode(TreeWalker.java:458)
        at org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:149)
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:389)
        at com.werum.rod.mailing.generator.Generator.createPSFile(Generator.java:198)


I seems that the files generated by fontforge are not complete.
.....
 --
Robert Eberhardt
e Business Solutions
Werum Software & Systems AG
Wulf-Werum-Straße 3 | 21337 Lüneburg
Tel. +49(0)4131/8900-194 | Fax +49(0)4131/8900-20
mailto:robert.eberhardt@werum.de | http://www.werum.de

USt-ID-Nr. DE 116 083 850 | RG Lüneburg HRB 2262
Vorsitzender des Aufsichtsrats: Johannes Zimmermann
Vorstand: Hartmut Krome, Rüdiger Schlierenkämper, Hans-Peter Subel

-----Ursprüngliche Nachricht-----
Von: Craig Ringer [mailto:ringerc@ringerc.id.au]
Gesendet: Donnerstag, 19. Januar 2012 03:41
An: fop-users@xmlgraphics.apache.org
Cc: Chris Bowditch
Betreff: Re: POstScrit Fonts

On 19/01/12 01:10, Chris Bowditch wrote:
> On 18/01/2012 13:13, Robert Eberhardt wrote:
>> Hello Craig,
>
> Hi Robert,
>
>>
>> as far as i know a pfb, a afm and a pfm file is needed. At least
>> under fop 0.95. Did this change under fop 1.0.
>
> FOP v1.0 does not introduce support for OTF CFF glyphs. This is a
> feature we would like too! You mwill need to work around the
> limitation using an approach like Craig suggested.

Unfortunately, as far as I can tell fop can also only handle simple
1-byte encoding fonts for PostScript output. You might be OK with this,
but if you need broad charset support like me you'll be stuffed.

I currently get to pick between:

- Abbreviated fonts without half the symbols I need that *do* work with
PostScript output; or
- Fonts that don't work with PostScript output but do contain all the
symbols I need

I'd love to use direct PDF instead of PostScript output, but I'm being
bitten by the inability to de-duplicate embedded subsets when PDFs are
inserted using fop-pdf-image. Distiller can de-duplicate subsets when
converting PostScript to PDF, so using fop's PostScript output lets me
work around that fop-pdf-image limitation. Or at least it would, if only
I could use the fonts I need with PS output...

I'm working on implementing font subset merging in fop-pdf-image, or at
least font re-embedding, but it's quite complicated to do and will take
time, esp as I have to get this project out the door and working ASAP so
I can't put too much time into that right now. I seem to be hitting
another limitation whenever I find a workaround for one, though.

This one seems insoluible: If fop can't use 2-byte encoded fonts in PS
output, and can't dedupe subset fonts in PDF output, I'm stuck.

--
Craig Ringer

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



Mime
View raw message