Fonts in the class path makes fonts listing fail

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Fonts in the class path makes fonts listing fail

Maxime Bégnis-2
When using fonts embedded in a .jar file in the class path (https://xmlgraphics.apache.org/fop/2.1/fonts.html#autodetect), fonts listing fails with this exception:

org.apache.fop.cli.Main startFOP
GRAVE: Exception
java.lang.IllegalArgumentException: URI is not hierarchical
    at java.io.File.<init>(File.java:418)
    at org.apache.fop.fonts.FontCache.addFont(FontCache.java:335)
    at org.apache.fop.fonts.autodetect.FontInfoFinder.getFontInfoFromCustomFont(FontInfoFinder.java:157)
    at org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:269)
    at org.apache.fop.fonts.FontAdder.add(FontAdder.java:63)
    at org.apache.fop.fonts.FontDetectorFactory$DefaultFontDetector.detect(FontDetectorFactory.java:110)
    at org.apache.fop.fonts.FontManager.autoDetectFonts(FontManager.java:229)
    at org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontConfigurator.java:82)
    at org.apache.fop.render.PrintRendererConfigurator.getCustomFontCollection(PrintRendererConfigurator.java:147)
    at org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:127)
    at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170)
    at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:187)
    at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:75)
    at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135)
    at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:105)
    at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:350)
    at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:107)
    at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104)
    at org.apache.fop.apps.Fop.<init>(Fop.java:78)
    at org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:182)
    at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:107)
    at org.apache.fop.cli.Main.startFOP(Main.java:186)
    at org.apache.fop.cli.Main.main(Main.java:217)

I found a way around this by using a custom resolver that will discard any "jar: ..." URI.

I use fonts in a jar file for them to be taken into account by JEuclid (I didn't find any other way so far).

I finally made this work by duplicating the fonts in the jar file in a regular folder (so I must maintain 2 copies of each file).

I'm using FOP 2.1 (from https://xmlgraphics.apache.org/fop/download.html) under Ubuntu 14.04 LTS Linux.

BR,

--
--
NeoDoc
Maxime Bégnis
[hidden email]
Tél: +33 (0)4.42.52.24.20
789 Rue de La Gare
13770 Venelles
France
Reply | Threaded
Open this post in threaded view
|

Re: Fonts in the class path makes fonts listing fail

Maxime Bégnis-2
Hello,

Is there a way for me to file a bug report about this?

BR,

--
NeoDoc
Maxime Bégnis
[hidden email]
Tél: +33 (0)4.42.52.24.20
789 Rue de La Gare
13770 Venelles
France
Le 10/06/2016 10:43, Maxime Bégnis a écrit :
When using fonts embedded in a .jar file in the class path (https://xmlgraphics.apache.org/fop/2.1/fonts.html#autodetect), fonts listing fails with this exception:

org.apache.fop.cli.Main startFOP
GRAVE: Exception
java.lang.IllegalArgumentException: URI is not hierarchical
    at java.io.File.<init>(File.java:418)
    at org.apache.fop.fonts.FontCache.addFont(FontCache.java:335)
    at org.apache.fop.fonts.autodetect.FontInfoFinder.getFontInfoFromCustomFont(FontInfoFinder.java:157)
    at org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:269)
    at org.apache.fop.fonts.FontAdder.add(FontAdder.java:63)
    at org.apache.fop.fonts.FontDetectorFactory$DefaultFontDetector.detect(FontDetectorFactory.java:110)
    at org.apache.fop.fonts.FontManager.autoDetectFonts(FontManager.java:229)
    at org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontConfigurator.java:82)
    at org.apache.fop.render.PrintRendererConfigurator.getCustomFontCollection(PrintRendererConfigurator.java:147)
    at org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:127)
    at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170)
    at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:187)
    at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:75)
    at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135)
    at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:105)
    at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:350)
    at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:107)
    at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104)
    at org.apache.fop.apps.Fop.<init>(Fop.java:78)
    at org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:182)
    at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:107)
    at org.apache.fop.cli.Main.startFOP(Main.java:186)
    at org.apache.fop.cli.Main.main(Main.java:217)

I found a way around this by using a custom resolver that will discard any "jar: ..." URI.

I use fonts in a jar file for them to be taken into account by JEuclid (I didn't find any other way so far).

I finally made this work by duplicating the fonts in the jar file in a regular folder (so I must maintain 2 copies of each file).

I'm using FOP 2.1 (from https://xmlgraphics.apache.org/fop/download.html) under Ubuntu 14.04 LTS Linux.

BR,

--
--
NeoDoc
Maxime Bégnis
[hidden email]
Tél: +33 (0)4.42.52.24.20
789 Rue de La Gare
13770 Venelles
France

Reply | Threaded
Open this post in threaded view
|

Re: Fonts in the class path makes fonts listing fail

Chris Bowditch
Hi Maxime,

You can file a bug using JIRA, see:
http://xmlgraphics.apache.org/fop/bugs.html

Thanks,

Chris

On 17/06/2016 08:24, Maxime Bégnis wrote:

> Hello,
>
> Is there a way for me to file a bug report about this?
>
> BR,
>
> --
> *NeoDoc*
> *Maxime Bégnis*
> [hidden email]
> Tél: +33 (0)4.42.52.24.20
> 789 Rue de La Gare
> 13770 Venelles
> France
> http://www.neodoc.fr/
> Le 10/06/2016 10:43, Maxime Bégnis a écrit :
>> When using fonts embedded in a .jar file in the class path
>> (https://xmlgraphics.apache.org/fop/2.1/fonts.html#autodetect), fonts
>> listing fails with this exception:
>>
>> org.apache.fop.cli.Main startFOP
>> GRAVE: Exception
>> java.lang.IllegalArgumentException: URI is not hierarchical
>>     at java.io.File.<init>(File.java:418)
>>     at org.apache.fop.fonts.FontCache.addFont(FontCache.java:335)
>>     at
>> org.apache.fop.fonts.autodetect.FontInfoFinder.getFontInfoFromCustomFont(FontInfoFinder.java:157)
>>     at
>> org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:269)
>>     at org.apache.fop.fonts.FontAdder.add(FontAdder.java:63)
>>     at
>> org.apache.fop.fonts.FontDetectorFactory$DefaultFontDetector.detect(FontDetectorFactory.java:110)
>>     at
>> org.apache.fop.fonts.FontManager.autoDetectFonts(FontManager.java:229)
>>     at
>> org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontConfigurator.java:82)
>>     at
>> org.apache.fop.render.PrintRendererConfigurator.getCustomFontCollection(PrintRendererConfigurator.java:147)
>>     at
>> org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:127)
>>     at
>> org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170)
>>     at
>> org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:187)
>>     at
>> org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:75)
>>     at
>> org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135)
>>     at
>> org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:105)
>>     at
>> org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:350)
>>     at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:107)
>>     at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104)
>>     at org.apache.fop.apps.Fop.<init>(Fop.java:78)
>>     at org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:182)
>>     at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:107)
>>     at org.apache.fop.cli.Main.startFOP(Main.java:186)
>>     at org.apache.fop.cli.Main.main(Main.java:217)
>>
>> I found a way around this by using a custom resolver that will
>> discard any "jar: ..." URI.
>>
>> I use fonts in a jar file for them to be taken into account by
>> JEuclid (I didn't find any other way so far).
>>
>> I finally made this work by duplicating the fonts in the jar file in
>> a regular folder (so I must maintain 2 copies of each file).
>>
>> I'm using FOP 2.1 (from
>> https://xmlgraphics.apache.org/fop/download.html) under Ubuntu 14.04
>> LTS Linux.
>>
>> BR,
>>
>> --
>> --
>> *NeoDoc*
>> *Maxime Bégnis*
>> [hidden email]
>> Tél: +33 (0)4.42.52.24.20
>> 789 Rue de La Gare
>> 13770 Venelles
>> France
>> http://www.neodoc.fr/
>


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

Reply | Threaded
Open this post in threaded view
|

Re: Fonts in the class path makes fonts listing fail

Maxime Bégnis-2
Hi Chris,

There it is: https://issues.apache.org/jira/browse/FOP-2611

I hope I did this the right way.

BR,

--
NeoDoc
Maxime Bégnis
[hidden email]
Tél: +33 (0)4.42.52.24.20
789 Rue de La Gare
13770 Venelles
France
Le 20/06/2016 11:16, Chris Bowditch a écrit :
Hi Maxime,

You can file a bug using JIRA, see: http://xmlgraphics.apache.org/fop/bugs.html

Thanks,

Chris

On 17/06/2016 08:24, Maxime Bégnis wrote:
Hello,

Is there a way for me to file a bug report about this?

BR,

-- 
*NeoDoc*
*Maxime Bégnis*
[hidden email]
Tél: +33 (0)4.42.52.24.20
789 Rue de La Gare
13770 Venelles
France
http://www.neodoc.fr/
Le 10/06/2016 10:43, Maxime Bégnis a écrit :
When using fonts embedded in a .jar file in the class path (https://xmlgraphics.apache.org/fop/2.1/fonts.html#autodetect), fonts listing fails with this exception:

org.apache.fop.cli.Main startFOP
GRAVE: Exception
java.lang.IllegalArgumentException: URI is not hierarchical
    at java.io.File.<init>(File.java:418)
    at org.apache.fop.fonts.FontCache.addFont(FontCache.java:335)
    at org.apache.fop.fonts.autodetect.FontInfoFinder.getFontInfoFromCustomFont(FontInfoFinder.java:157)
    at org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:269)
    at org.apache.fop.fonts.FontAdder.add(FontAdder.java:63)
    at org.apache.fop.fonts.FontDetectorFactory$DefaultFontDetector.detect(FontDetectorFactory.java:110)
    at org.apache.fop.fonts.FontManager.autoDetectFonts(FontManager.java:229)
    at org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontConfigurator.java:82)
    at org.apache.fop.render.PrintRendererConfigurator.getCustomFontCollection(PrintRendererConfigurator.java:147)
    at org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:127)
    at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170)
    at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:187)
    at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:75)
    at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135)
    at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:105)
    at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:350)
    at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:107)
    at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104)
    at org.apache.fop.apps.Fop.<init>(Fop.java:78)
    at org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:182)
    at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:107)
    at org.apache.fop.cli.Main.startFOP(Main.java:186)
    at org.apache.fop.cli.Main.main(Main.java:217)

I found a way around this by using a custom resolver that will discard any "jar: ..." URI.

I use fonts in a jar file for them to be taken into account by JEuclid (I didn't find any other way so far).

I finally made this work by duplicating the fonts in the jar file in a regular folder (so I must maintain 2 copies of each file).

I'm using FOP 2.1 (from https://xmlgraphics.apache.org/fop/download.html) under Ubuntu 14.04 LTS Linux.

BR,

-- 
-- 
*NeoDoc*
*Maxime Bégnis*
[hidden email]
Tél: +33 (0)4.42.52.24.20
789 Rue de La Gare
13770 Venelles
France
http://www.neodoc.fr/



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