Re: font-base is ignored in 2.1
Sure I opened this one - https://issues.apache.org/jira/browse/FOP-2600 On 22 March 2016 at 04:14, Pascal Sancho wrote: > Hi, > > Please, can you file in a JIRA ticket to keep this in in mind. > > > 2016-03-21 17:09 GMT+01:00 Adam Retter : >> Thanks for getting back to me Chris, >> >> Okay that makes sense to me then, and I was able to work with custom >> resolvers to get around the issue I have. >> >> However, you still have references in both your code and documentation >> to , so it is not obvious that this has been removed! >> Perhaps a little clean-up is in order ;-) >> >> On 21 March 2016 at 11:19, Chris Bowditch wrote: >>> Hi Adam, >>> >>> I believe FOP Base was intentionally removed when FOP IO was reworked in the >>> v2.0 release. Which version are you upgrading from? >>> >>> I seem to recall the developers couldn't think of a use case where Font Base >>> would need to differ from wildly from Base, and so Font Base was >>> consolidated with Base. >>> >>> Thanks, >>> >>> Chris >>> >>> >>> On 11/03/2016 22:39, Adam Retter wrote: It seems that fonts are not being resolved relative to the font-base config parameter in 2.1, instead they are being resolved directly by the ResourceResolver. This looks like a bug to me, can anyone confirm? I have a FOP configuration file like this: true false ./ http://localhost:8080/exist/apps/tei-simple/resources/fonts/ >>> embed-url="Junicode.ttf" encoding-mode="single-byte"> >>> weight="normal"/> >>> embed-url="Junicode-Bold.ttf" encoding-mode="single-byte"> >>> weight="700"/> >>> embed-url="Junicode-Italic.ttf" encoding-mode="single-byte"> >>> weight="normal"/> >>> embed-url="Junicode-BoldItalic.ttf" encoding-mode="single-byte"> >>> weight="700"/> And I instantiate FOP like so: ResourceResolver resolver = ResourceResolverFactory.createSchemeAwareResourceResolverBuilder(ResourceResolverFactory.createDefaultResourceResolver()).build(); EnvironmentProfile environment = EnvironmentalProfileFactory.createDefault(new URI("file:///db"), resolver); final FopFactoryBuilder = builder = new FopFactoryBuilder(environment).setConfiguration(configFile); final FopFactory fopFactory = builder.build(); When I run my FO transformation I then get an error like: Caused by: java.io.FileNotFoundException: /Junicode.ttf (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138) at java.io.FileInputStream.(FileInputStream.java:93) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at java.net.URL.openStream(URL.java:1045) at org.apache.fop.apps.io.ResourceResolverFactory$NormalResourceResolver.getResource(ResourceResolverFactory.java:224) at org.apache.fop.apps.io.ResourceResolverFactory$TempAwareResourceResolver.getResource(ResourceResolverFactory.java:152) at org.apache.fop.apps.io.ResourceResolverFactory$DefaultResourceResolver.getResource(ResourceResolverFactory.java:121) at org.apache.fop.apps.io.ResourceResolverFactory$SchemeAwareResourceResolver.getResource(ResourceResolverFactory.java:256) at org.apache.fop.apps.io.InternalResourceResolver.getResource(InternalResourceResolver.java:92) at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:103) at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:93) at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:124) at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:108) at org.apache.fop.fonts.LazyFont.load(LazyFont.java:116) When I look through the FOP 2.1 code-base I see that the `font-base` only seems to be read in FontManagerConfigurator#configure, however that code-path is never executed when I run my app. Any thoughts? >>> >>> >>> - >>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org >>> For additional commands, e-ma
Re: font-base is ignored in 2.1
Hi, Please, can you file in a JIRA ticket to keep this in in mind. 2016-03-21 17:09 GMT+01:00 Adam Retter : > Thanks for getting back to me Chris, > > Okay that makes sense to me then, and I was able to work with custom > resolvers to get around the issue I have. > > However, you still have references in both your code and documentation > to , so it is not obvious that this has been removed! > Perhaps a little clean-up is in order ;-) > > On 21 March 2016 at 11:19, Chris Bowditch wrote: >> Hi Adam, >> >> I believe FOP Base was intentionally removed when FOP IO was reworked in the >> v2.0 release. Which version are you upgrading from? >> >> I seem to recall the developers couldn't think of a use case where Font Base >> would need to differ from wildly from Base, and so Font Base was >> consolidated with Base. >> >> Thanks, >> >> Chris >> >> >> On 11/03/2016 22:39, Adam Retter wrote: >>> >>> It seems that fonts are not being resolved relative to the font-base >>> config parameter in 2.1, instead they are being resolved directly by >>> the ResourceResolver. This looks like a bug to me, can anyone confirm? >>> >>> I have a FOP configuration file like this: >>> >>> >>> >>> true >>> >>> >>> false >>> >>> >>> ./ >>> >>> >>> >>> http://localhost:8080/exist/apps/tei-simple/resources/fonts/ >>> >>> >>> >>> >> embed-url="Junicode.ttf" >>> encoding-mode="single-byte"> >>> >> weight="normal"/> >>> >>> >> embed-url="Junicode-Bold.ttf" >>> encoding-mode="single-byte"> >>> >> weight="700"/> >>> >>> >> embed-url="Junicode-Italic.ttf" >>> encoding-mode="single-byte"> >>> >> weight="normal"/> >>> >>> >> embed-url="Junicode-BoldItalic.ttf" >>> encoding-mode="single-byte"> >>> >> weight="700"/> >>> >>> >>> >>> >>> >>> >>> >>> And I instantiate FOP like so: >>> >>> ResourceResolver resolver = >>> >>> ResourceResolverFactory.createSchemeAwareResourceResolverBuilder(ResourceResolverFactory.createDefaultResourceResolver()).build(); >>> EnvironmentProfile environment = >>> EnvironmentalProfileFactory.createDefault(new URI("file:///db"), >>> resolver); >>> final FopFactoryBuilder = builder = new >>> FopFactoryBuilder(environment).setConfiguration(configFile); >>> final FopFactory fopFactory = builder.build(); >>> >>> When I run my FO transformation I then get an error like: >>> >>> Caused by: java.io.FileNotFoundException: /Junicode.ttf (No such file >>> or directory) >>> at java.io.FileInputStream.open0(Native Method) >>> at java.io.FileInputStream.open(FileInputStream.java:195) >>> at java.io.FileInputStream.(FileInputStream.java:138) >>> at java.io.FileInputStream.(FileInputStream.java:93) >>> at >>> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) >>> at >>> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) >>> at java.net.URL.openStream(URL.java:1045) >>> at >>> org.apache.fop.apps.io.ResourceResolverFactory$NormalResourceResolver.getResource(ResourceResolverFactory.java:224) >>> at >>> org.apache.fop.apps.io.ResourceResolverFactory$TempAwareResourceResolver.getResource(ResourceResolverFactory.java:152) >>> at >>> org.apache.fop.apps.io.ResourceResolverFactory$DefaultResourceResolver.getResource(ResourceResolverFactory.java:121) >>> at >>> org.apache.fop.apps.io.ResourceResolverFactory$SchemeAwareResourceResolver.getResource(ResourceResolverFactory.java:256) >>> at >>> org.apache.fop.apps.io.InternalResourceResolver.getResource(InternalResourceResolver.java:92) >>> at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:103) >>> at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:93) >>> at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:124) >>> at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:108) >>> at org.apache.fop.fonts.LazyFont.load(LazyFont.java:116) >>> >>> >>> When I look through the FOP 2.1 code-base I see that the `font-base` >>> only seems to be read in FontManagerConfigurator#configure, however >>> that code-path is never executed when I run my app. >>> >>> Any thoughts? >>> >> >> >> - >> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org >> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org >> > > > > -- > Adam Retter > > skype: adam.retter > tweet: adamretter > http://www.adamretter.org.uk > > - > To unsubscribe, e-mail: fop-users-unsubscr
Re: font-base is ignored in 2.1
Thanks for getting back to me Chris, Okay that makes sense to me then, and I was able to work with custom resolvers to get around the issue I have. However, you still have references in both your code and documentation to , so it is not obvious that this has been removed! Perhaps a little clean-up is in order ;-) On 21 March 2016 at 11:19, Chris Bowditch wrote: > Hi Adam, > > I believe FOP Base was intentionally removed when FOP IO was reworked in the > v2.0 release. Which version are you upgrading from? > > I seem to recall the developers couldn't think of a use case where Font Base > would need to differ from wildly from Base, and so Font Base was > consolidated with Base. > > Thanks, > > Chris > > > On 11/03/2016 22:39, Adam Retter wrote: >> >> It seems that fonts are not being resolved relative to the font-base >> config parameter in 2.1, instead they are being resolved directly by >> the ResourceResolver. This looks like a bug to me, can anyone confirm? >> >> I have a FOP configuration file like this: >> >> >> >> true >> >> >> false >> >> >> ./ >> >> >> >> http://localhost:8080/exist/apps/tei-simple/resources/fonts/ >> >> >> >> > embed-url="Junicode.ttf" >> encoding-mode="single-byte"> >> > weight="normal"/> >> >> > embed-url="Junicode-Bold.ttf" >> encoding-mode="single-byte"> >> > weight="700"/> >> >> > embed-url="Junicode-Italic.ttf" >> encoding-mode="single-byte"> >> > weight="normal"/> >> >> > embed-url="Junicode-BoldItalic.ttf" >> encoding-mode="single-byte"> >> > weight="700"/> >> >> >> >> >> >> >> >> And I instantiate FOP like so: >> >> ResourceResolver resolver = >> >> ResourceResolverFactory.createSchemeAwareResourceResolverBuilder(ResourceResolverFactory.createDefaultResourceResolver()).build(); >> EnvironmentProfile environment = >> EnvironmentalProfileFactory.createDefault(new URI("file:///db"), >> resolver); >> final FopFactoryBuilder = builder = new >> FopFactoryBuilder(environment).setConfiguration(configFile); >> final FopFactory fopFactory = builder.build(); >> >> When I run my FO transformation I then get an error like: >> >> Caused by: java.io.FileNotFoundException: /Junicode.ttf (No such file >> or directory) >> at java.io.FileInputStream.open0(Native Method) >> at java.io.FileInputStream.open(FileInputStream.java:195) >> at java.io.FileInputStream.(FileInputStream.java:138) >> at java.io.FileInputStream.(FileInputStream.java:93) >> at >> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) >> at >> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) >> at java.net.URL.openStream(URL.java:1045) >> at >> org.apache.fop.apps.io.ResourceResolverFactory$NormalResourceResolver.getResource(ResourceResolverFactory.java:224) >> at >> org.apache.fop.apps.io.ResourceResolverFactory$TempAwareResourceResolver.getResource(ResourceResolverFactory.java:152) >> at >> org.apache.fop.apps.io.ResourceResolverFactory$DefaultResourceResolver.getResource(ResourceResolverFactory.java:121) >> at >> org.apache.fop.apps.io.ResourceResolverFactory$SchemeAwareResourceResolver.getResource(ResourceResolverFactory.java:256) >> at >> org.apache.fop.apps.io.InternalResourceResolver.getResource(InternalResourceResolver.java:92) >> at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:103) >> at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:93) >> at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:124) >> at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:108) >> at org.apache.fop.fonts.LazyFont.load(LazyFont.java:116) >> >> >> When I look through the FOP 2.1 code-base I see that the `font-base` >> only seems to be read in FontManagerConfigurator#configure, however >> that code-path is never executed when I run my app. >> >> Any thoughts? >> > > > - > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > -- Adam Retter skype: adam.retter tweet: adamretter http://www.adamretter.org.uk - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: font-base is ignored in 2.1
Hi Adam, I believe FOP Base was intentionally removed when FOP IO was reworked in the v2.0 release. Which version are you upgrading from? I seem to recall the developers couldn't think of a use case where Font Base would need to differ from wildly from Base, and so Font Base was consolidated with Base. Thanks, Chris On 11/03/2016 22:39, Adam Retter wrote: It seems that fonts are not being resolved relative to the font-base config parameter in 2.1, instead they are being resolved directly by the ResourceResolver. This looks like a bug to me, can anyone confirm? I have a FOP configuration file like this: true false ./ http://localhost:8080/exist/apps/tei-simple/resources/fonts/ And I instantiate FOP like so: ResourceResolver resolver = ResourceResolverFactory.createSchemeAwareResourceResolverBuilder(ResourceResolverFactory.createDefaultResourceResolver()).build(); EnvironmentProfile environment = EnvironmentalProfileFactory.createDefault(new URI("file:///db"), resolver); final FopFactoryBuilder = builder = new FopFactoryBuilder(environment).setConfiguration(configFile); final FopFactory fopFactory = builder.build(); When I run my FO transformation I then get an error like: Caused by: java.io.FileNotFoundException: /Junicode.ttf (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138) at java.io.FileInputStream.(FileInputStream.java:93) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at java.net.URL.openStream(URL.java:1045) at org.apache.fop.apps.io.ResourceResolverFactory$NormalResourceResolver.getResource(ResourceResolverFactory.java:224) at org.apache.fop.apps.io.ResourceResolverFactory$TempAwareResourceResolver.getResource(ResourceResolverFactory.java:152) at org.apache.fop.apps.io.ResourceResolverFactory$DefaultResourceResolver.getResource(ResourceResolverFactory.java:121) at org.apache.fop.apps.io.ResourceResolverFactory$SchemeAwareResourceResolver.getResource(ResourceResolverFactory.java:256) at org.apache.fop.apps.io.InternalResourceResolver.getResource(InternalResourceResolver.java:92) at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:103) at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:93) at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:124) at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:108) at org.apache.fop.fonts.LazyFont.load(LazyFont.java:116) When I look through the FOP 2.1 code-base I see that the `font-base` only seems to be read in FontManagerConfigurator#configure, however that code-path is never executed when I run my app. Any thoughts? - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
font-base is ignored in 2.1
It seems that fonts are not being resolved relative to the font-base config parameter in 2.1, instead they are being resolved directly by the ResourceResolver. This looks like a bug to me, can anyone confirm? I have a FOP configuration file like this: true false ./ http://localhost:8080/exist/apps/tei-simple/resources/fonts/ And I instantiate FOP like so: ResourceResolver resolver = ResourceResolverFactory.createSchemeAwareResourceResolverBuilder(ResourceResolverFactory.createDefaultResourceResolver()).build(); EnvironmentProfile environment = EnvironmentalProfileFactory.createDefault(new URI("file:///db"), resolver); final FopFactoryBuilder = builder = new FopFactoryBuilder(environment).setConfiguration(configFile); final FopFactory fopFactory = builder.build(); When I run my FO transformation I then get an error like: Caused by: java.io.FileNotFoundException: /Junicode.ttf (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138) at java.io.FileInputStream.(FileInputStream.java:93) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at java.net.URL.openStream(URL.java:1045) at org.apache.fop.apps.io.ResourceResolverFactory$NormalResourceResolver.getResource(ResourceResolverFactory.java:224) at org.apache.fop.apps.io.ResourceResolverFactory$TempAwareResourceResolver.getResource(ResourceResolverFactory.java:152) at org.apache.fop.apps.io.ResourceResolverFactory$DefaultResourceResolver.getResource(ResourceResolverFactory.java:121) at org.apache.fop.apps.io.ResourceResolverFactory$SchemeAwareResourceResolver.getResource(ResourceResolverFactory.java:256) at org.apache.fop.apps.io.InternalResourceResolver.getResource(InternalResourceResolver.java:92) at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:103) at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:93) at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:124) at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:108) at org.apache.fop.fonts.LazyFont.load(LazyFont.java:116) When I look through the FOP 2.1 code-base I see that the `font-base` only seems to be read in FontManagerConfigurator#configure, however that code-path is never executed when I run my app. Any thoughts? -- Adam Retter skype: adam.retter tweet: adamretter http://www.adamretter.org.uk - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org