[jira] [Created] (FOP-2896) Font Autodetection is not active in default configuration any more

2019-12-14 Thread Dimitry Polivaev (Jira)
Dimitry Polivaev created FOP-2896:
-

 Summary: Font Autodetection is not active in default configuration 
any more
 Key: FOP-2896
 URL: https://issues.apache.org/jira/browse/FOP-2896
 Project: FOP
  Issue Type: Bug
Affects Versions: 2.4
Reporter: Dimitry Polivaev


org.apache.fop.svg.AbstractFOPTranscoder.getEffectiveConfiguration() does not 
work as expected. It contains following code:
{code:java}
 if (autoFonts) {
DefaultConfiguration c = new DefaultConfiguration("cfg");
DefaultConfiguration fonts = new DefaultConfiguration("fonts");
c.addChild(fonts);
DefaultConfiguration autodetect = new 
DefaultConfiguration("auto-detect");
fonts.addChild(autodetect);
effCfg = c;
}
{code}
Unfortunately {{c.addChild(fonts)}} copies element {{fonts}} into configuration 
{{c}}. When {{fonts.addChild(autodetect)}} is called it has no effect on the 
resulting configuration {{c}} any more. To fix the bug 
{{fonts.addChild(autodetect)}} should be called before {{c.addChild(fonts)}}

This logic worked in fop version 2.2 using another implementation of 
configuration, but now it doesn't.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (FOP-2895) maven jar artifact org.apache.xmlgraphics:fop-transcoder-allinone:2.4 misses content

2019-12-14 Thread Dimitry Polivaev (Jira)
Dimitry Polivaev created FOP-2895:
-

 Summary: maven jar artifact 
org.apache.xmlgraphics:fop-transcoder-allinone:2.4 misses content
 Key: FOP-2895
 URL: https://issues.apache.org/jira/browse/FOP-2895
 Project: FOP
  Issue Type: Bug
  Components: unqualified
Affects Versions: 2.4
Reporter: Dimitry Polivaev


Batik 1.12 uses PDFTranscoder from FOP 2.4 contained in jar file 
fop-transcoder-allinone-2.4.jar included in binary distribution available as 
batik/binaries/batik-bin-1.12.zip

However packages org.apache.fop.configuration and org.apache.fop.config 
contained in this file are missed in  fop-transcoder-allinone-2.4.jar  
available as maven artifact  
org.apache.xmlgraphics:fop-transcoder-allinone:2.4. It makes impossible to use 
the maven artifact as expected.






--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FOP-2893) hyph resources in jar should have unique names and should be in Maven central

2019-12-14 Thread Olivier Cailloux (Jira)


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

Olivier Cailloux commented on FOP-2893:
---

Partial workaround. I currently create a FopFactory in the following way.

final URL configUrl = 
DocBookUtils.class.getResource("fop-config.xml");
try (InputStream configStream = configUrl.openStream()) {
final FopFactory fopFactory;
try {
fopFactory = 
FopFactory.newInstance(Hyphenator.class.getResource(".").toURI(), configStream);
} catch (URISyntaxException | SAXException e) {
throw new IllegalStateException(e);
}
}

(Sorry, didn’t find how to format code properly.)

This allows me to put the hyphenation files in the org/apache/fop/hyphenation 
resource folder.

Not sure this is a best practice though.

> hyph resources in jar should have unique names and should be in Maven central
> -
>
> Key: FOP-2893
> URL: https://issues.apache.org/jira/browse/FOP-2893
> Project: FOP
>  Issue Type: Bug
>Reporter: Olivier Cailloux
>Priority: Minor
>
> Please consider adding the jar containing the hyphenation resources 
> ({{fop-hyph.jar}}) to Maven central, so that it can be easily added to a 
> third-party application using fop to build PDFs.
> Please also consider giving those resources [unique 
> names|https://github.com/oliviercailloux/java-course/blob/master/Best%20practices/Resources.adoc#use-unique-names]
>  to avoid conflicts and easily identify them. (This means the loader of those 
> resources should also be changed to make it look at the right places.)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)