[jira] [Updated] (FOP-2724) [PATCH] Shrink text to fit block-container

2017-08-02 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2724:

Attachment: shrink-to-fit_20170802.patch

Updated path. support list-block.

> [PATCH] Shrink text to fit block-container
> --
>
> Key: FOP-2724
> URL: https://issues.apache.org/jira/browse/FOP-2724
> Project: FOP
>  Issue Type: New Feature
>  Components: layout/block
>Affects Versions: trunk
>Reporter: chunlinyao
> Attachments: block-container_no_shrink.fo, 
> block-container_no_shrink.pdf, block-container_shrink.fo, 
> block-container_shrink.pdf, shrink-to-fit_20170802.patch, shrink-to-fit.patch
>
>
> In my project I have to fill text in some fixed size area. This patch enable 
> shrink text to fit block-container feature.
> When a block-container is not auto height, and with a 
> fox:shrink-to-fit="true" attribute, If the block overflows It will reduce the 
> font size and line height to fit the block-container.
> I'm not very familiar with the fop layout engine, this is a quick hack 
> implementation, hope some one can improve it.
> I also committed the modified version in GitHub. 
> https://github.com/chunlinyao/fop/tree/b1acf564afc9747546db6c386a0ae339e69f39e9



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FOP-2699) Acrobat Reader error with Morisawa Fonts

2017-07-23 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097681#comment-16097681
 ] 

chunlinyao commented on FOP-2699:
-

In "Morisawa Ryumin", why the subset offset larger then the original one?

> Acrobat Reader error with Morisawa Fonts
> 
>
> Key: FOP-2699
> URL: https://issues.apache.org/jira/browse/FOP-2699
> Project: FOP
>  Issue Type: Bug
>  Components: font/opentype
>Affects Versions: trunk
> Environment: Operating Systems: Windows
> JDK: 1.8
> OpenFont: Morisawa ShinGo Pro R
>Reporter: Kazuyuki Murakami
> Attachments: fop.xconf, test.fo, test_full.pdf, test_subset.pdf, 
> workaround.patch
>
>
> The Morisawa ShinGo Pro R font cannot be embedded into PDF document.
> How to repeat
> 1. Get FOP from trunk@1786161
> 2. Get Font from 
> https://github.com/skyavy-cebu/DoubleClick/blob/master/web/fonts/A-OTF-ShinGoPro-Regular.otf?raw=true
> 3. Use my config file and generate the PDF, there is no error reported.
> 4. Open the PDF file in Acro-Reader, it will report the "cannot extract the 
> embedded font" error.
> Notes:
> I can display normally with full embedding.
> (Please refer to test.fo, test_subset.pdf, test_full.pdf)
> When examining the subset font with CFFParser, the following Exception 
> occurred.
> java.io.EOFException
> at org.apache.fontbox.cff.DataInput.readUnsignedShort(DataInput.java:151)
> at org.apache.fontbox.cff.CFFDataInput.readCard16(CFFDataInput.java:55)
> at org.apache.fontbox.cff.CFFParser.readIndexDataOffsets(CFFParser.java:172)
> at org.apache.fontbox.cff.CFFParser.readIndexData(CFFParser.java:193)
> at org.apache.fontbox.cff.CFFParser.parseCIDFontDicts(CFFParser.java:590)
> at org.apache.fontbox.cff.CFFParser.parseFont(CFFParser.java:503)
> at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:141)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (FOP-2699) Acrobat Reader error with Morisawa ShinGo Pro R

2017-07-22 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2699:

Attachment: workaround.patch

A simple patch to make your test.fo work. but not a final solution.

> Acrobat Reader error with Morisawa ShinGo Pro R
> ---
>
> Key: FOP-2699
> URL: https://issues.apache.org/jira/browse/FOP-2699
> Project: FOP
>  Issue Type: Bug
>  Components: font/opentype
>Affects Versions: trunk
> Environment: Operating Systems: Windows
> JDK: 1.8
> OpenFont: Morisawa ShinGo Pro R
>Reporter: Kazuyuki Murakami
> Attachments: fop.xconf, test.fo, test_full.pdf, test_subset.pdf, 
> workaround.patch
>
>
> The Morisawa ShinGo Pro R font cannot be embedded into PDF document.
> How to repeat
> 1. Get FOP from trunk@1786161
> 2. Get Font from 
> https://github.com/skyavy-cebu/DoubleClick/blob/master/web/fonts/A-OTF-ShinGoPro-Regular.otf?raw=true
> 3. Use my config file and generate the PDF, there is no error reported.
> 4. Open the PDF file in Acro-Reader, it will report the "cannot extract the 
> embedded font" error.
> Notes:
> I can display normally with full embedding.
> (Please refer to test.fo, test_subset.pdf, test_full.pdf)
> When examining the subset font with CFFParser, the following Exception 
> occurred.
> java.io.EOFException
> at org.apache.fontbox.cff.DataInput.readUnsignedShort(DataInput.java:151)
> at org.apache.fontbox.cff.CFFDataInput.readCard16(CFFDataInput.java:55)
> at org.apache.fontbox.cff.CFFParser.readIndexDataOffsets(CFFParser.java:172)
> at org.apache.fontbox.cff.CFFParser.readIndexData(CFFParser.java:193)
> at org.apache.fontbox.cff.CFFParser.parseCIDFontDicts(CFFParser.java:590)
> at org.apache.fontbox.cff.CFFParser.parseFont(CFFParser.java:503)
> at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:141)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FOP-2699) Acrobat Reader error with Morisawa ShinGo Pro R

2017-07-22 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097351#comment-16097351
 ] 

chunlinyao commented on FOP-2699:
-

I suspect  it caused by writeCIDDictsAndSubrs  method  in 
`OTFSubSetFile.java:503`. when it call updateOffset, the operand length is 2 
but the replacement is only 29, which under 108 should use one byte encode, not 
two bytes.




> Acrobat Reader error with Morisawa ShinGo Pro R
> ---
>
> Key: FOP-2699
> URL: https://issues.apache.org/jira/browse/FOP-2699
> Project: FOP
>  Issue Type: Bug
>  Components: font/opentype
>Affects Versions: trunk
> Environment: Operating Systems: Windows
> JDK: 1.8
> OpenFont: Morisawa ShinGo Pro R
>Reporter: Kazuyuki Murakami
> Attachments: fop.xconf, test.fo, test_full.pdf, test_subset.pdf
>
>
> The Morisawa ShinGo Pro R font cannot be embedded into PDF document.
> How to repeat
> 1. Get FOP from trunk@1786161
> 2. Get Font from 
> https://github.com/skyavy-cebu/DoubleClick/blob/master/web/fonts/A-OTF-ShinGoPro-Regular.otf?raw=true
> 3. Use my config file and generate the PDF, there is no error reported.
> 4. Open the PDF file in Acro-Reader, it will report the "cannot extract the 
> embedded font" error.
> Notes:
> I can display normally with full embedding.
> (Please refer to test.fo, test_subset.pdf, test_full.pdf)
> When examining the subset font with CFFParser, the following Exception 
> occurred.
> java.io.EOFException
> at org.apache.fontbox.cff.DataInput.readUnsignedShort(DataInput.java:151)
> at org.apache.fontbox.cff.CFFDataInput.readCard16(CFFDataInput.java:55)
> at org.apache.fontbox.cff.CFFParser.readIndexDataOffsets(CFFParser.java:172)
> at org.apache.fontbox.cff.CFFParser.readIndexData(CFFParser.java:193)
> at org.apache.fontbox.cff.CFFParser.parseCIDFontDicts(CFFParser.java:590)
> at org.apache.fontbox.cff.CFFParser.parseFont(CFFParser.java:503)
> at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:141)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (FOP-2724) [PATCH] Shrink text to fit block-container

2017-07-12 Thread chunlinyao (JIRA)
chunlinyao created FOP-2724:
---

 Summary: [PATCH] Shrink text to fit block-container
 Key: FOP-2724
 URL: https://issues.apache.org/jira/browse/FOP-2724
 Project: FOP
  Issue Type: New Feature
  Components: layout/block
Affects Versions: trunk
Reporter: chunlinyao
 Attachments: block-container_no_shrink.fo, 
block-container_no_shrink.pdf, block-container_shrink.fo, 
block-container_shrink.pdf, shrink-to-fit.patch

In my project I have to fill text in some fixed size area. This patch enable 
shrink text to fit block-container feature.
When a block-container is not auto height, and with a fox:shrink-to-fit="true" 
attribute, If the block overflows It will reduce the font size and line height 
to fit the block-container.

I'm not very familiar with the fop layout engine, this is a quick hack 
implementation, hope some one can improve it.

I also committed the modified version in GitHub. 
https://github.com/chunlinyao/fop/tree/b1acf564afc9747546db6c386a0ae339e69f39e9



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (FOP-2722) Use letter-spacing.maximum and alignment justification with CJK contents throw Exception

2017-07-10 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2722:

Description: 
I am try to use letter-spacing.maximum to justification CJK contents.

{code:xml}
 

 生产年


{code}

With CJK contents fop throw Exception

{code:java}
Caused by: java.lang.IllegalArgumentException: factor < 0; was: -1
at org.apache.fop.traits.MinOptMax.mult(MinOptMax.java:253) 
~[fop-2.2.jar:?]
at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.addElementsForAWordFragment(TextLayoutManager.java:1331)
 ~[fop-2.2.jar:?]
at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.processWord(TextLayoutManager.java:947)
 ~[fop-2.2.jar:?]
at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(TextLayoutManager.java:805)
 ~[fop-2.2.jar:?]
 
{code}

After some debug I found on TextLayoutManager.java:1325 it set factor to -1.


{code:java}
int unsuppressibleLetterSpaces = suppressibleLetterSpace
  ? mapping.letterSpaceCount - 1
  : mapping.letterSpaceCount;
{code}

Should we change it to:

{code:java}
int unsuppressibleLetterSpaces = (suppressibleLetterSpace &&  
mapping.letterSpaceCount > 0)
  ? mapping.letterSpaceCount - 1
  : mapping.letterSpaceCount;
{code}

  was:
I am try to use letter-spacing.maximum to justification CJK contents.

{code:xml}
 

 生产年


{code}

With CJK contents fop throw Exception

{code:java}
Caused by: java.lang.IllegalArgumentException: factor < 0; was: -1
at org.apache.fop.traits.MinOptMax.mult(MinOptMax.java:253) 
~[fop-2.2.jar:?]
at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.addElementsForAWordFragment(TextLayoutManager.java:1331)
 ~[fop-2.2.jar:?]
at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.processWord(TextLayoutManager.java:947)
 ~[fop-2.2.jar:?]
at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(TextLayoutManager.java:805)
 ~[fop-2.2.jar:?]
 
{code}

After some debug I found on TextLayoutManager.java:1325 it set factor to -1.


{code:java}
int unsuppressibleLetterSpaces = suppressibleLetterSpace
  ? mapping.letterSpaceCount - 1
  : mapping.letterSpaceCount;
{code}

Should we change it to:
int unsuppressibleLetterSpaces = (suppressibleLetterSpace &&  
mapping.letterSpaceCount > 0)
  ? mapping.letterSpaceCount - 1
  : mapping.letterSpaceCount;



> Use letter-spacing.maximum and alignment  justification with CJK contents 
> throw Exception
> -
>
> Key: FOP-2722
> URL: https://issues.apache.org/jira/browse/FOP-2722
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: 2.2
>Reporter: chunlinyao
>
> I am try to use letter-spacing.maximum to justification CJK contents.
> {code:xml}
>  
> 
>  生产年
> 
> 
> {code}
> With CJK contents fop throw Exception
> {code:java}
> Caused by: java.lang.IllegalArgumentException: factor < 0; was: -1
> at org.apache.fop.traits.MinOptMax.mult(MinOptMax.java:253) 
> ~[fop-2.2.jar:?]
> at 
> org.apache.fop.layoutmgr.inline.TextLayoutManager.addElementsForAWordFragment(TextLayoutManager.java:1331)
>  ~[fop-2.2.jar:?]
> at 
> org.apache.fop.layoutmgr.inline.TextLayoutManager.processWord(TextLayoutManager.java:947)
>  ~[fop-2.2.jar:?]
> at 
> org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(TextLayoutManager.java:805)
>  ~[fop-2.2.jar:?]
>  
> {code}
> After some debug I found on TextLayoutManager.java:1325 it set factor to -1.
> 
> {code:java}
> int unsuppressibleLetterSpaces = suppressibleLetterSpace
>   ? mapping.letterSpaceCount - 1
>   : mapping.letterSpaceCount;
> {code}
> Should we change it to:
> {code:java}
> int unsuppressibleLetterSpaces = (suppressibleLetterSpace &&  
> mapping.letterSpaceCount > 0)
>   ? mapping.letterSpaceCount - 1
>   : mapping.letterSpaceCount;
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (FOP-2722) Use letter-spacing.maximum and alignment justification with CJK contents throw Exception

2017-07-10 Thread chunlinyao (JIRA)
chunlinyao created FOP-2722:
---

 Summary: Use letter-spacing.maximum and alignment  justification 
with CJK contents throw Exception
 Key: FOP-2722
 URL: https://issues.apache.org/jira/browse/FOP-2722
 Project: FOP
  Issue Type: Bug
  Components: layout/inline
Affects Versions: 2.2
Reporter: chunlinyao


I am try to use letter-spacing.maximum to justification CJK contents.

{code:xml}
 

 生产年


{code}

With CJK contents fop throw Exception

{code:java}
Caused by: java.lang.IllegalArgumentException: factor < 0; was: -1
at org.apache.fop.traits.MinOptMax.mult(MinOptMax.java:253) 
~[fop-2.2.jar:?]
at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.addElementsForAWordFragment(TextLayoutManager.java:1331)
 ~[fop-2.2.jar:?]
at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.processWord(TextLayoutManager.java:947)
 ~[fop-2.2.jar:?]
at 
org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(TextLayoutManager.java:805)
 ~[fop-2.2.jar:?]
 
{code}

After some debug I found on TextLayoutManager.java:1325 it set factor to -1.


{code:java}
int unsuppressibleLetterSpaces = suppressibleLetterSpace
  ? mapping.letterSpaceCount - 1
  : mapping.letterSpaceCount;
{code}

Should we change it to:
int unsuppressibleLetterSpaces = (suppressibleLetterSpace &&  
mapping.letterSpaceCount > 0)
  ? mapping.letterSpaceCount - 1
  : mapping.letterSpaceCount;




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FOP-2525) [PATCH] Memory leak present when using Truetype Collection (.ttc)

2016-09-21 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15511781#comment-15511781
 ] 

chunlinyao commented on FOP-2525:
-

Is there any issue in this patch to prevent it be accepted? It really resolved 
memory leak. And is needed for CJK fonts.

> [PATCH] Memory leak present when using Truetype Collection (.ttc)
> -
>
> Key: FOP-2525
> URL: https://issues.apache.org/jira/browse/FOP-2525
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: At least Mac and Linux, both Oracle VM and OpenJDK
>Reporter: Jeremy Smith
>Priority: Minor
> Attachments: FOP-2525.patch, FOP_patch_heap-usage.png
>
>
> When a TrueType Collection file is used to specify custom fonts, and a 
> long-running FopFactory is used to create FOP instances to process many FO 
> input documents, millions of 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$PairValues and 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$Values instances 
> get created which are never collected.  Thus the heap continues to grow, 
> leading to eventual GC thrashing or crash.
> When the same fonts are used, but extracted from the TTC file, the issue does 
> not occur, and the instances of those classes are collected normally.
> The issue can be seen by repeatedly processing a document with a config.xml 
> which specifies fonts inside of a Truetype Collection file.  Attaching 
> VisualVM to such a process will show continuous heap growth and millions of 
> aforementioned instances whose numbers never decrease.



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



[jira] [Commented] (FOP-2587) Acrobat Reader error with Google Noto Sans CJK fonts

2016-03-06 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15182636#comment-15182636
 ] 

chunlinyao commented on FOP-2587:
-

Can you test the PATCH (latest one) in FOP-2557 .

> Acrobat Reader error with Google Noto Sans CJK fonts
> 
>
> Key: FOP-2587
> URL: https://issues.apache.org/jira/browse/FOP-2587
> Project: FOP
>  Issue Type: Bug
>  Components: font/opentype
>Affects Versions: 2.1
> Environment: Operating Systems: Windows
> Platform: PC
>Reporter: Hua Lan
> Attachments: testNoto.fo, testNoto_Black.pdf, testNoto_Bold.pdf, 
> testNoto_DemiLight.pdf, testNoto_Light.pdf, testNoto_Medium.pdf, 
> testNoto_Regular.pdf, testNoto_Thin.pdf
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> This is a followup to https://issues.apache.org/jira/browse/FOP-2491
> Symptom: when opening the PDF file generated by FOP 2.1, depending on the 
> font weight, the Acrobat Reader has the following issues:
> 1. some characters are not well aligned with others in the same line 
> horizontally
> 2. it reports "cannot extract the embedded font 'EB+NotoSansCJKSC'. Some 
> characters may not display or print correctly". Some characters are missing 
> on the PDF.
> How to repeat:
> 1. Get FOP 2.1 library.
> 2. Get Google-Noto-Sans from 
> https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKTC-hinted.zip.
> 3. Set the fop.xconf as following:
>  
>  . 
>   embed-url="Noto_Sans/NotoSansCJKsc-Black.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKsc-Bold.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKsc-DemiLight.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKsc-Light.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKsc-Medium.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKsc-Regular.otf" >
>  style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKsc-Thin.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKtc-Black.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKtc-Bold.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKtc-DemiLight.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKtc-Light.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKtc-Medium.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKtc-Regular.otf" >
>  style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKtc-Thin.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKjp-Black.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKjp-Bold.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKjp-DemiLight.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKjp-Light.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKjp-Medium.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKjp-Regular.otf" >
>  style="normal" weight="normal" />
>   
>   embed-url="Noto_Sans/NotoSansCJKjp-Thin.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKkr-Black.otf" >
>   style="normal" weight="normal" />
>  
>   embed-url="Noto_Sans/NotoSansCJKkr-Bold.otf" >
>   

[jira] [Updated] (FOP-2557) [PATCH] Adobe Reader report corrupt embedded font

2016-03-04 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2557:

Attachment: patch_with_fixed_test_case-20160304.txt

A new path include OTFSubSetFileTestCase fixes

> [PATCH] Adobe Reader report corrupt embedded font 
> --
>
> Key: FOP-2557
> URL: https://issues.apache.org/jira/browse/FOP-2557
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: trunk
> Environment: Mac OSX 10.10, JDK 1.8
>Reporter: chunlinyao
>  Labels: patch
> Attachments: fop.xconf, patch.txt, patch20160104.txt, 
> patch_20160102.txt, patch_with_fixed_test_case-20160304.txt, test_fail.xml, 
> test_fail2.pdf, test_fail2.xml, test_good.pdf, test_good.xml, testbigset.pdf, 
> testbigset.xml, testbigset_full.pdf
>
>
> When use NotoSansCJKSc regular font, If I don't include any number the 
> embedded subset is corrupt.
> How to repeat
> 1. Get FOP from trunk@1720811
> 2. Get Font from 
> https://github.com/googlei18n/noto-cjk/blob/40d9f5b179a59a06b98373c76bdc3e2119e4e6b2/NotoSansCJKsc-Regular.otf
> 3. Use my config file and transform my fo files.



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


[jira] [Commented] (FOP-2460) Subsetting OTF font leads to PDF errors when viewing / incorrect characters

2016-03-03 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15179377#comment-15179377
 ] 

chunlinyao commented on FOP-2460:
-

I'd like to provide a TestCase,  OTFSubSetFileTestCase.java seems OK but the 
getFullCharString logic in it is not correct. I need a OTF font use hints and 
subroutines heavily to test. Noto Sans CJK is over 15M.

> Subsetting OTF font leads to PDF errors when viewing / incorrect characters
> ---
>
> Key: FOP-2460
> URL: https://issues.apache.org/jira/browse/FOP-2460
> Project: FOP
>  Issue Type: Bug
>  Components: font/opentype
>Affects Versions: trunk
>Reporter: Robert Meyer
>
> When attempting to generate a document whilst subsetting the 
> VilleroyBoch-Regular.otf font, different viewers will either show errors, no 
> text or lead to incorrect or corrupt characters being drawn.
> I currentlty believe this is down to either a subroutine not being copied 
> from the original font leading to a invalid reference, or the subroutine does 
> not contain valid data. When looking at this font in FontForge, 3 characters 
> in a "hello world" example I used were missing which backs up this hypothesis.
> [EDIT] I've removed the font as I did not check if there were copyright 
> issues by making it public domain. I will work when I am able to do so but 
> keep the font privately unless I hear otherwise from the user who originally 
> posted the problem



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


[jira] [Commented] (FOP-2460) Subsetting OTF font leads to PDF errors when viewing / incorrect characters

2016-03-02 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15176838#comment-15176838
 ] 

chunlinyao commented on FOP-2460:
-

[~rmeyer] can you confirm is this issue resolved by a patch in FOP-2557

> Subsetting OTF font leads to PDF errors when viewing / incorrect characters
> ---
>
> Key: FOP-2460
> URL: https://issues.apache.org/jira/browse/FOP-2460
> Project: FOP
>  Issue Type: Bug
>  Components: font/opentype
>Affects Versions: trunk
>Reporter: Robert Meyer
>
> When attempting to generate a document whilst subsetting the 
> VilleroyBoch-Regular.otf font, different viewers will either show errors, no 
> text or lead to incorrect or corrupt characters being drawn.
> I currentlty believe this is down to either a subroutine not being copied 
> from the original font leading to a invalid reference, or the subroutine does 
> not contain valid data. When looking at this font in FontForge, 3 characters 
> in a "hello world" example I used were missing which backs up this hypothesis.
> [EDIT] I've removed the font as I did not check if there were copyright 
> issues by making it public domain. I will work when I am able to do so but 
> keep the font privately unless I hear otherwise from the user who originally 
> posted the problem



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


[jira] [Updated] (FOP-2557) [PATCH] Adobe Reader report corrupt embedded font

2016-02-01 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2557:

Labels: patch  (was: )

> [PATCH] Adobe Reader report corrupt embedded font 
> --
>
> Key: FOP-2557
> URL: https://issues.apache.org/jira/browse/FOP-2557
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: trunk
> Environment: Mac OSX 10.10, JDK 1.8
>Reporter: chunlinyao
>  Labels: patch
> Attachments: fop.xconf, patch.txt, patch20160104.txt, 
> patch_20160102.txt, test_fail.xml, test_fail2.pdf, test_fail2.xml, 
> test_good.pdf, test_good.xml, testbigset.pdf, testbigset.xml, 
> testbigset_full.pdf
>
>
> When use NotoSansCJKSc regular font, If I don't include any number the 
> embedded subset is corrupt.
> How to repeat
> 1. Get FOP from trunk@1720811
> 2. Get Font from 
> https://github.com/googlei18n/noto-cjk/blob/40d9f5b179a59a06b98373c76bdc3e2119e4e6b2/NotoSansCJKsc-Regular.otf
> 3. Use my config file and transform my fo files.



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


[jira] [Updated] (FOP-2559) [PATCH] Kerning doesn't work for OTF/CFF font

2016-02-01 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2559:

Labels: patch  (was: )

> [PATCH] Kerning doesn't work for OTF/CFF font
> -
>
> Key: FOP-2559
> URL: https://issues.apache.org/jira/browse/FOP-2559
> Project: FOP
>  Issue Type: Bug
>  Components: font/opentype
>Affects Versions: trunk
>Reporter: chunlinyao
>Priority: Minor
>  Labels: patch
> Attachments: patch.txt
>
>
> According to the spec. "OpenType™ fonts containing CFF outlines are not 
> supported by the 'kern' table and must use the 'GPOS' OpenType Layout table."
> But OFFontLoader hasn't pass the useAdvanced flag to OTFFile, so GPOS table 
> not read.



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


[jira] [Created] (FOP-2559) Kerning doesn't work for OTF/CFF font

2016-01-03 Thread chunlinyao (JIRA)
chunlinyao created FOP-2559:
---

 Summary: Kerning doesn't work for OTF/CFF font
 Key: FOP-2559
 URL: https://issues.apache.org/jira/browse/FOP-2559
 Project: FOP
  Issue Type: Bug
  Components: font/opentype
Affects Versions: trunk
Reporter: chunlinyao
Priority: Minor


According to the spec. "OpenType™ fonts containing CFF outlines are not 
supported by the 'kern' table and must use the 'GPOS' OpenType Layout table."

But OFFontLoader hasn't pass the useAdvanced flag to OTFFile, so GPOS table not 
read.



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


[jira] [Updated] (FOP-2557) [PATCH] Adobe Reader report corrupt embedded font

2016-01-03 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2557:

Attachment: patch20160104.txt

An updated patch, Which cache the hint mask length after call 
preScanForSubsetIndexSize. Will speed up the readCharStringData method.
Tested with testbigset.xml shown createCharStringDataCID method got 20%  faster.

> [PATCH] Adobe Reader report corrupt embedded font 
> --
>
> Key: FOP-2557
> URL: https://issues.apache.org/jira/browse/FOP-2557
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: trunk
> Environment: Mac OSX 10.10, JDK 1.8
>Reporter: chunlinyao
> Attachments: fop.xconf, patch.txt, patch20160104.txt, 
> patch_20160102.txt, test_fail.xml, test_fail2.pdf, test_fail2.xml, 
> test_good.pdf, test_good.xml, testbigset.pdf, testbigset.xml, 
> testbigset_full.pdf
>
>
> When use NotoSansCJKSc regular font, If I don't include any number the 
> embedded subset is corrupt.
> How to repeat
> 1. Get FOP from trunk@1720811
> 2. Get Font from 
> https://github.com/googlei18n/noto-cjk/blob/40d9f5b179a59a06b98373c76bdc3e2119e4e6b2/NotoSansCJKsc-Regular.otf
> 3. Use my config file and transform my fo files.



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


[jira] [Updated] (FOP-2559) Kerning doesn't work for OTF/CFF font

2016-01-03 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2559:

Attachment: patch.txt

I Enabled advanced features for OTF/CFF by the attached patch. The kerning 
using GPOS table just works fine.

Is there a special reason to disable advanced features for OTF/CFF font.

> Kerning doesn't work for OTF/CFF font
> -
>
> Key: FOP-2559
> URL: https://issues.apache.org/jira/browse/FOP-2559
> Project: FOP
>  Issue Type: Bug
>  Components: font/opentype
>Affects Versions: trunk
>Reporter: chunlinyao
>Priority: Minor
> Attachments: patch.txt
>
>
> According to the spec. "OpenType™ fonts containing CFF outlines are not 
> supported by the 'kern' table and must use the 'GPOS' OpenType Layout table."
> But OFFontLoader hasn't pass the useAdvanced flag to OTFFile, so GPOS table 
> not read.



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


[jira] [Commented] (FOP-2252) [PATCH] OpenType CFF support for FOP

2016-01-03 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15080423#comment-15080423
 ] 

chunlinyao commented on FOP-2252:
-

I don't known why it does not pass the useAdvanced flag to OTFFile at  L108 of  
OFFontLoader 


I enabled it and try to generage some pdf, It seems gpos for OpenType CFF font 
works fine. because I can see the kerning works. CFF using gpos table instead 
of kern table for kerning. Is there any reason to disable the useAdvanced flag?

> [PATCH] OpenType CFF support for FOP
> 
>
> Key: FOP-2252
> URL: https://issues.apache.org/jira/browse/FOP-2252
> Project: FOP
>  Issue Type: New Feature
>  Components: font/unqualified
>Affects Versions: trunk
>Reporter: Robert Meyer
>Assignee: Robert Meyer
> Fix For: trunk
>
> Attachments: AlexBrushRegular.otf, SourceSansProBold.otf, 
> fontbox-1.8.0-SNAPSHOT.jar, fop.xconf, output.pdf, patch-240713.diff, 
> test.fo, test.pdf
>
>




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


[jira] [Updated] (FOP-2557) [PATCH] Adobe Reader report corrupt embedded font

2016-01-02 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2557:

Attachment: testbigset.xml
testbigset.pdf
testbigset_full.pdf
patch_20160102.txt

After test with OTF subset. I found there are other bugs related to embedded 
subset. I created a test file which contains over 5 different glyphs 
(testbigset.xml). I tested It against Noto Sans font. fop throw 
ArrayIndexOutOfBoundsException in many place and some glyphs displayed as 
garbage. The `patch_20160102.txt` fixed these bugs. Finally I got  a output 
`testbigset.pdf` which is displayed same as full embedded file 
`testbigset_full.pdf`.

SomeBugs
1. IndexData.getValue AIOBE
2. when parse Type2 charstring,  mask length of operator 19 and 20 not correct.
3. getNewRef operand between -108 and -1131 not encoded correctly.

> [PATCH] Adobe Reader report corrupt embedded font 
> --
>
> Key: FOP-2557
> URL: https://issues.apache.org/jira/browse/FOP-2557
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: trunk
> Environment: Mac OSX 10.10, JDK 1.8
>Reporter: chunlinyao
> Attachments: fop.xconf, patch.txt, patch_20160102.txt, test_fail.xml, 
> test_fail2.pdf, test_fail2.xml, test_good.pdf, test_good.xml, testbigset.pdf, 
> testbigset.xml, testbigset_full.pdf
>
>
> When use NotoSansCJKSc regular font, If I don't include any number the 
> embedded subset is corrupt.
> How to repeat
> 1. Get FOP from trunk@1720811
> 2. Get Font from 
> https://github.com/googlei18n/noto-cjk/blob/40d9f5b179a59a06b98373c76bdc3e2119e4e6b2/NotoSansCJKsc-Regular.otf
> 3. Use my config file and transform my fo files.



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


[jira] [Commented] (FOP-2557) Adobe Reader report corrupt embedded font

2015-12-31 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15075870#comment-15075870
 ] 

chunlinyao commented on FOP-2557:
-

Read embedded stream by CFFParser, test_good.pdf is ok, test_fail2.pdf failed 
at reading stringindex.

Exception in thread "main" java.lang.NegativeArraySizeException
at org.apache.fontbox.cff.IndexData.initData(IndexData.java:95)
at org.apache.fontbox.cff.CFFParser.readIndexData(CFFParser.java:162)
at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:114)

> Adobe Reader report corrupt embedded font 
> --
>
> Key: FOP-2557
> URL: https://issues.apache.org/jira/browse/FOP-2557
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: trunk
> Environment: Mac OSX 10.10, JDK 1.8
>Reporter: chunlinyao
> Attachments: fop.xconf, test_fail.xml, test_fail2.pdf, 
> test_fail2.xml, test_good.pdf, test_good.xml
>
>
> When use NotoSansCJKSc regular font, If I don't include any number the 
> embedded subset is corrupt.
> How to repeat
> 1. Get FOP from trunk@1720811
> 2. Get Font from 
> https://github.com/googlei18n/noto-cjk/blob/40d9f5b179a59a06b98373c76bdc3e2119e4e6b2/NotoSansCJKsc-Regular.otf
> 3. Use my config file and transform my fo files.



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


[jira] [Updated] (FOP-2557) Adobe Reader report corrupt embedded font

2015-12-31 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2557:

Attachment: patch.txt

The offsize caculation is not correct. This is a patch.

> Adobe Reader report corrupt embedded font 
> --
>
> Key: FOP-2557
> URL: https://issues.apache.org/jira/browse/FOP-2557
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: trunk
> Environment: Mac OSX 10.10, JDK 1.8
>Reporter: chunlinyao
> Attachments: fop.xconf, patch.txt, test_fail.xml, test_fail2.pdf, 
> test_fail2.xml, test_good.pdf, test_good.xml
>
>
> When use NotoSansCJKSc regular font, If I don't include any number the 
> embedded subset is corrupt.
> How to repeat
> 1. Get FOP from trunk@1720811
> 2. Get Font from 
> https://github.com/googlei18n/noto-cjk/blob/40d9f5b179a59a06b98373c76bdc3e2119e4e6b2/NotoSansCJKsc-Regular.otf
> 3. Use my config file and transform my fo files.



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


[jira] [Updated] (FOP-2557) Adobe Reader report corrupt embedded font

2015-12-30 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2557:

Attachment: test_fail2.pdf
test_good.pdf

These are pdf files. It seems the embedded font stream is corrupt.

> Adobe Reader report corrupt embedded font 
> --
>
> Key: FOP-2557
> URL: https://issues.apache.org/jira/browse/FOP-2557
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: trunk
> Environment: Mac OSX 10.10, JDK 1.8
>Reporter: chunlinyao
> Attachments: fop.xconf, test_fail.xml, test_fail2.pdf, 
> test_fail2.xml, test_good.pdf, test_good.xml
>
>
> When use NotoSansCJKSc regular font, If I don't include any number the 
> embedded subset is corrupt.
> How to repeat
> 1. Get FOP from trunk@1720811
> 2. Get Font from 
> https://github.com/googlei18n/noto-cjk/blob/40d9f5b179a59a06b98373c76bdc3e2119e4e6b2/NotoSansCJKsc-Regular.otf
> 3. Use my config file and transform my fo files.



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


[jira] [Created] (FOP-2557) Adobe Reader report corrupt embedded font

2015-12-30 Thread chunlinyao (JIRA)
chunlinyao created FOP-2557:
---

 Summary: Adobe Reader report corrupt embedded font 
 Key: FOP-2557
 URL: https://issues.apache.org/jira/browse/FOP-2557
 Project: FOP
  Issue Type: Bug
  Components: fo/block
Affects Versions: trunk
 Environment: Mac OSX 10.10, JDK 1.8
Reporter: chunlinyao


When use NotoSansCJKSc regular font, If I don't include any number the embedded 
subset is corrupt.

How to repeat
1. Get FOP from trunk@1720811
2. Get Font from 
https://github.com/googlei18n/noto-cjk/blob/40d9f5b179a59a06b98373c76bdc3e2119e4e6b2/NotoSansCJKsc-Regular.otf
3. Use my config file and transform my fo files.



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


[jira] [Commented] (FOP-2557) Adobe Reader report corrupt embedded font

2015-12-30 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15075484#comment-15075484
 ] 

chunlinyao commented on FOP-2557:
-

The issue on github mentioned that PDF was generated by iText 2.1.6 and use 
LibreOffice to generate PDF with same font doesn't have any issue.

> Adobe Reader report corrupt embedded font 
> --
>
> Key: FOP-2557
> URL: https://issues.apache.org/jira/browse/FOP-2557
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: trunk
> Environment: Mac OSX 10.10, JDK 1.8
>Reporter: chunlinyao
> Attachments: fop.xconf, test_fail.xml, test_fail2.xml, test_good.xml
>
>
> When use NotoSansCJKSc regular font, If I don't include any number the 
> embedded subset is corrupt.
> How to repeat
> 1. Get FOP from trunk@1720811
> 2. Get Font from 
> https://github.com/googlei18n/noto-cjk/blob/40d9f5b179a59a06b98373c76bdc3e2119e4e6b2/NotoSansCJKsc-Regular.otf
> 3. Use my config file and transform my fo files.



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


[jira] [Commented] (FOP-2557) Adobe Reader report corrupt embedded font

2015-12-30 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15075468#comment-15075468
 ] 

chunlinyao commented on FOP-2557:
-

But embedding full font will not report error. Maybe the font has some bug to 
create a subset.

> Adobe Reader report corrupt embedded font 
> --
>
> Key: FOP-2557
> URL: https://issues.apache.org/jira/browse/FOP-2557
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: trunk
> Environment: Mac OSX 10.10, JDK 1.8
>Reporter: chunlinyao
> Attachments: fop.xconf, test_fail.xml, test_fail2.xml, test_good.xml
>
>
> When use NotoSansCJKSc regular font, If I don't include any number the 
> embedded subset is corrupt.
> How to repeat
> 1. Get FOP from trunk@1720811
> 2. Get Font from 
> https://github.com/googlei18n/noto-cjk/blob/40d9f5b179a59a06b98373c76bdc3e2119e4e6b2/NotoSansCJKsc-Regular.otf
> 3. Use my config file and transform my fo files.



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


[jira] [Updated] (FOP-2473) PDFTranscoder lost some text

2015-05-22 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2473:

Attachment: hello.svg

A sample file to reproduce this bug.

 PDFTranscoder lost some text
 

 Key: FOP-2473
 URL: https://issues.apache.org/jira/browse/FOP-2473
 Project: FOP
  Issue Type: Bug
  Components: foreign/svg
Affects Versions: trunk
 Environment: Java 1.7.0_09
 Ubuntu 14.04
Reporter: chunlinyao
 Attachments: hello.svg


 I have some svg file can transform to PDF in version 1.0 but not in trunk.
 I did a bisect, found the  rev-1508208 is the fist bad version.
 It run into FOPGVTGlyphVector.draw method which is empty.



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


[jira] [Created] (FOP-2473) PDFTranscoder lost some text

2015-05-22 Thread chunlinyao (JIRA)
chunlinyao created FOP-2473:
---

 Summary: PDFTranscoder lost some text
 Key: FOP-2473
 URL: https://issues.apache.org/jira/browse/FOP-2473
 Project: FOP
  Issue Type: Bug
  Components: foreign/svg
Affects Versions: trunk
 Environment: Java 1.7.0_09
Ubuntu 14.04
Reporter: chunlinyao


I have some svg file can transform to PDF in version 1.0 but not in trunk.
I did a bisect, found the  rev-1508208 is the fist bad version.

It run into FOPGVTGlyphVector.draw method which is empty.



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


[jira] [Commented] (FOP-2468) Render svg throw NPE if use local fonts with metrics xml.

2015-05-19 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14551345#comment-14551345
 ] 

chunlinyao commented on FOP-2468:
-

Auto-detection works fine. In my use case I use MS Gothic, which is a font in 
windows. My application run on linux. I can't copy the MS Gothic to linux 
because the license restriction. I can ship the metrics file with my 
application and not embed the font in pdf. Adobe reader will use the font in 
the user's system to render pdf.

I think the  XML font metrics support will be discarded  in future., I should 
switch to  a solution use IPA Gothic font which is opensource.

 Render svg throw NPE if use local fonts with metrics xml.
 -

 Key: FOP-2468
 URL: https://issues.apache.org/jira/browse/FOP-2468
 Project: Fop
  Issue Type: Bug
  Components: foreign/svg
Affects Versions: trunk
Reporter: chunlinyao
 Attachments: bug.zip, test.fo


 I got a error when use svg with local fonts. It seems boundingboxes is null.
 SVG graphic could not be rendered. Reason: java.lang.NullPointerException
 java.lang.NullPointerException
   at 
 org.apache.fop.fonts.MultiByteFont.getBoundingBox(MultiByteFont.java:210)
   at org.apache.fop.fonts.LazyFont.getBoundingBox(LazyFont.java:301)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.buildBoundingBoxes(FOPGVTGlyphVector.java:428)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.getBoundingBoxes(FOPGVTGlyphVector.java:420)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.getGlyphMetrics(FOPGVTGlyphVector.java:290)
   at org.apache.batik.bridge.GlyphLayout.doExplicitGlyphLayout(Unknown 
 Source)
   at org.apache.batik.bridge.GlyphLayout.adjustTextSpacing(Unknown Source)
   at org.apache.batik.bridge.GlyphLayout.getAdvance2D(Unknown Source)
   at org.apache.batik.bridge.StrokingTextPainter.getTextChunk(Unknown 
 Source)
   at org.apache.batik.bridge.StrokingTextPainter.computeTextRuns(Unknown 
 Source)
   at 
 org.apache.fop.svg.NativeTextPainter.computeTextRuns(NativeTextPainter.java:223)
   at org.apache.batik.bridge.StrokingTextPainter.getTextRuns(Unknown 
 Source)
   at org.apache.batik.bridge.StrokingTextPainter.getBounds2D(Unknown 
 Source)
   at org.apache.batik.bridge.TextNode.getPrimitiveBounds(Unknown Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(Unknown
  Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
  Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
   at org.apache.batik.gvt.AbstractGraphicsNode.getBounds(Unknown Source)
   at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
   at 
 org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:207)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingDocument(AbstractIFPainter.java:319)
   at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:232)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderForeignObject(IFRenderer.java:1308)
   at 
 org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:861)
   at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:862)
   at 
 org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:714)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:926)
   at 
 org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:689)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:571)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:612)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:556)
   at 
 

[jira] [Commented] (FOP-2468) Render svg throw NPE if use local fonts with metrics xml.

2015-05-18 Thread chunlinyao (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14549676#comment-14549676
 ] 

chunlinyao commented on FOP-2468:
-

I am using OS X Yosemite.

java version 1.8.0_45
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

This bug can only be reproduced with metrics xml. I will attach a new example 
use `./test/resources/fonts/ttf/DroidSansMono.ttf`

 Render svg throw NPE if use local fonts with metrics xml.
 -

 Key: FOP-2468
 URL: https://issues.apache.org/jira/browse/FOP-2468
 Project: Fop
  Issue Type: Bug
  Components: foreign/svg
Affects Versions: trunk
Reporter: chunlinyao
 Attachments: test.fo


 I got a error when use svg with local fonts. It seems boundingboxes is null.
 SVG graphic could not be rendered. Reason: java.lang.NullPointerException
 java.lang.NullPointerException
   at 
 org.apache.fop.fonts.MultiByteFont.getBoundingBox(MultiByteFont.java:210)
   at org.apache.fop.fonts.LazyFont.getBoundingBox(LazyFont.java:301)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.buildBoundingBoxes(FOPGVTGlyphVector.java:428)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.getBoundingBoxes(FOPGVTGlyphVector.java:420)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.getGlyphMetrics(FOPGVTGlyphVector.java:290)
   at org.apache.batik.bridge.GlyphLayout.doExplicitGlyphLayout(Unknown 
 Source)
   at org.apache.batik.bridge.GlyphLayout.adjustTextSpacing(Unknown Source)
   at org.apache.batik.bridge.GlyphLayout.getAdvance2D(Unknown Source)
   at org.apache.batik.bridge.StrokingTextPainter.getTextChunk(Unknown 
 Source)
   at org.apache.batik.bridge.StrokingTextPainter.computeTextRuns(Unknown 
 Source)
   at 
 org.apache.fop.svg.NativeTextPainter.computeTextRuns(NativeTextPainter.java:223)
   at org.apache.batik.bridge.StrokingTextPainter.getTextRuns(Unknown 
 Source)
   at org.apache.batik.bridge.StrokingTextPainter.getBounds2D(Unknown 
 Source)
   at org.apache.batik.bridge.TextNode.getPrimitiveBounds(Unknown Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(Unknown
  Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
  Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
   at org.apache.batik.gvt.AbstractGraphicsNode.getBounds(Unknown Source)
   at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
   at 
 org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:207)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingDocument(AbstractIFPainter.java:319)
   at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:232)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderForeignObject(IFRenderer.java:1308)
   at 
 org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:861)
   at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:862)
   at 
 org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:714)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:926)
   at 
 org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:689)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:571)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:612)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:556)
   at 
 org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:456)
   at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:785)
   at 
 

[jira] [Updated] (FOP-2468) Render svg throw NPE if use local fonts with metrics xml.

2015-05-18 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2468:

Attachment: bug.zip

unzip this zip file in the fop folder. run `./fop -c config.xml bug.fo bug.pdf` 
will reproduce this bug.

 Render svg throw NPE if use local fonts with metrics xml.
 -

 Key: FOP-2468
 URL: https://issues.apache.org/jira/browse/FOP-2468
 Project: Fop
  Issue Type: Bug
  Components: foreign/svg
Affects Versions: trunk
Reporter: chunlinyao
 Attachments: bug.zip, test.fo


 I got a error when use svg with local fonts. It seems boundingboxes is null.
 SVG graphic could not be rendered. Reason: java.lang.NullPointerException
 java.lang.NullPointerException
   at 
 org.apache.fop.fonts.MultiByteFont.getBoundingBox(MultiByteFont.java:210)
   at org.apache.fop.fonts.LazyFont.getBoundingBox(LazyFont.java:301)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.buildBoundingBoxes(FOPGVTGlyphVector.java:428)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.getBoundingBoxes(FOPGVTGlyphVector.java:420)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.getGlyphMetrics(FOPGVTGlyphVector.java:290)
   at org.apache.batik.bridge.GlyphLayout.doExplicitGlyphLayout(Unknown 
 Source)
   at org.apache.batik.bridge.GlyphLayout.adjustTextSpacing(Unknown Source)
   at org.apache.batik.bridge.GlyphLayout.getAdvance2D(Unknown Source)
   at org.apache.batik.bridge.StrokingTextPainter.getTextChunk(Unknown 
 Source)
   at org.apache.batik.bridge.StrokingTextPainter.computeTextRuns(Unknown 
 Source)
   at 
 org.apache.fop.svg.NativeTextPainter.computeTextRuns(NativeTextPainter.java:223)
   at org.apache.batik.bridge.StrokingTextPainter.getTextRuns(Unknown 
 Source)
   at org.apache.batik.bridge.StrokingTextPainter.getBounds2D(Unknown 
 Source)
   at org.apache.batik.bridge.TextNode.getPrimitiveBounds(Unknown Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(Unknown
  Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
  Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
   at org.apache.batik.gvt.AbstractGraphicsNode.getBounds(Unknown Source)
   at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
   at 
 org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:207)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingDocument(AbstractIFPainter.java:319)
   at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:232)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderForeignObject(IFRenderer.java:1308)
   at 
 org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:861)
   at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:862)
   at 
 org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:714)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:926)
   at 
 org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:689)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:571)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:612)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:556)
   at 
 org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:456)
   at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:785)
   at 
 org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:433)
   at 
 org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:357)
   at 
 

[jira] [Updated] (FOP-2468) Render svg throw NPE if use local fonts with metrics xml.

2015-05-12 Thread chunlinyao (JIRA)

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

chunlinyao updated FOP-2468:

Attachment: test.fo

The fo file

 Render svg throw NPE if use local fonts with metrics xml.
 -

 Key: FOP-2468
 URL: https://issues.apache.org/jira/browse/FOP-2468
 Project: Fop
  Issue Type: Bug
  Components: foreign/svg
Affects Versions: trunk
Reporter: chunlinyao
 Attachments: test.fo


 I got a error when use svg with local fonts. It seems boundingboxes is null.
 SVG graphic could not be rendered. Reason: java.lang.NullPointerException
 java.lang.NullPointerException
   at 
 org.apache.fop.fonts.MultiByteFont.getBoundingBox(MultiByteFont.java:210)
   at org.apache.fop.fonts.LazyFont.getBoundingBox(LazyFont.java:301)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.buildBoundingBoxes(FOPGVTGlyphVector.java:428)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.getBoundingBoxes(FOPGVTGlyphVector.java:420)
   at 
 org.apache.fop.svg.font.FOPGVTGlyphVector.getGlyphMetrics(FOPGVTGlyphVector.java:290)
   at org.apache.batik.bridge.GlyphLayout.doExplicitGlyphLayout(Unknown 
 Source)
   at org.apache.batik.bridge.GlyphLayout.adjustTextSpacing(Unknown Source)
   at org.apache.batik.bridge.GlyphLayout.getAdvance2D(Unknown Source)
   at org.apache.batik.bridge.StrokingTextPainter.getTextChunk(Unknown 
 Source)
   at org.apache.batik.bridge.StrokingTextPainter.computeTextRuns(Unknown 
 Source)
   at 
 org.apache.fop.svg.NativeTextPainter.computeTextRuns(NativeTextPainter.java:223)
   at org.apache.batik.bridge.StrokingTextPainter.getTextRuns(Unknown 
 Source)
   at org.apache.batik.bridge.StrokingTextPainter.getBounds2D(Unknown 
 Source)
   at org.apache.batik.bridge.TextNode.getPrimitiveBounds(Unknown Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(Unknown
  Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
  Source)
   at 
 org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
   at 
 org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
   at org.apache.batik.gvt.AbstractGraphicsNode.getBounds(Unknown Source)
   at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
   at 
 org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:207)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
   at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingDocument(AbstractIFPainter.java:319)
   at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:232)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderForeignObject(IFRenderer.java:1308)
   at 
 org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:861)
   at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:862)
   at 
 org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:714)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:926)
   at 
 org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:689)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:571)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:612)
   at 
 org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998)
   at 
 org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:556)
   at 
 org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:456)
   at 
 org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:785)
   at 
 org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:433)
   at 
 org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:357)
   at 
 org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:304)
   at 
 

[jira] [Created] (FOP-2468) Render svg throw NPE if use local fonts with metrics xml.

2015-05-12 Thread chunlinyao (JIRA)
chunlinyao created FOP-2468:
---

 Summary: Render svg throw NPE if use local fonts with metrics xml.
 Key: FOP-2468
 URL: https://issues.apache.org/jira/browse/FOP-2468
 Project: Fop
  Issue Type: Bug
  Components: foreign/svg
Affects Versions: trunk
Reporter: chunlinyao


I got a error when use svg with local fonts. It seems boundingboxes is null.

SVG graphic could not be rendered. Reason: java.lang.NullPointerException
java.lang.NullPointerException
at 
org.apache.fop.fonts.MultiByteFont.getBoundingBox(MultiByteFont.java:210)
at org.apache.fop.fonts.LazyFont.getBoundingBox(LazyFont.java:301)
at 
org.apache.fop.svg.font.FOPGVTGlyphVector.buildBoundingBoxes(FOPGVTGlyphVector.java:428)
at 
org.apache.fop.svg.font.FOPGVTGlyphVector.getBoundingBoxes(FOPGVTGlyphVector.java:420)
at 
org.apache.fop.svg.font.FOPGVTGlyphVector.getGlyphMetrics(FOPGVTGlyphVector.java:290)
at org.apache.batik.bridge.GlyphLayout.doExplicitGlyphLayout(Unknown 
Source)
at org.apache.batik.bridge.GlyphLayout.adjustTextSpacing(Unknown Source)
at org.apache.batik.bridge.GlyphLayout.getAdvance2D(Unknown Source)
at org.apache.batik.bridge.StrokingTextPainter.getTextChunk(Unknown 
Source)
at org.apache.batik.bridge.StrokingTextPainter.computeTextRuns(Unknown 
Source)
at 
org.apache.fop.svg.NativeTextPainter.computeTextRuns(NativeTextPainter.java:223)
at org.apache.batik.bridge.StrokingTextPainter.getTextRuns(Unknown 
Source)
at org.apache.batik.bridge.StrokingTextPainter.getBounds2D(Unknown 
Source)
at org.apache.batik.bridge.TextNode.getPrimitiveBounds(Unknown Source)
at 
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(Unknown 
Source)
at 
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
at 
org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
at 
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
 Source)
at 
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
at 
org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
at org.apache.batik.gvt.AbstractGraphicsNode.getBounds(Unknown Source)
at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
at 
org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:207)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingDocument(AbstractIFPainter.java:319)
at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:232)
at 
org.apache.fop.render.intermediate.IFRenderer.renderForeignObject(IFRenderer.java:1308)
at 
org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:861)
at 
org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
at 
org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:862)
at 
org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:714)
at 
org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:926)
at 
org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:689)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:571)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:612)
at 
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:556)
at 
org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:456)
at 
org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:785)
at 
org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:433)
at 
org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:357)
at 
org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:304)
at 
org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:737)
at 
org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:278)
at 
org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:243)
at