You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Dimitry Polivaev (Jira)" <ji...@apache.org> on 2019/12/14 22:29:00 UTC

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

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)