While debugging FOP-2197 [1], I learned that:

   - junit-transcoder tests all end up performing auto font detection,
   which seems questionable [is this needed?]
   - auto font detection performs recursion on the font base directory even
   though the code comment in DefaultFontDetector.detect(...) says

               // search in font base if it is defined and

               // is a directory but don't recurse

   - multiple paths to consing TTFFontLoader sometimes result in complex
   script features being parsed (useAdvanced == true), even when the complex
   script features are disabled at a higher, configuration level

As a result, the code that is actually executed when running
junit-transcoder ends up being highly variable according to one's local
file system and font configuration. This is probably not a good thing.

I'd suggest we find a way endeavor to:

   1. ensure that we aren't using auto font detection when running any
   junit tests unless we are specifically testing auto detection functionality;
   2. ensure that auto font detection, when it should and must run, does
   not search outside of its intended directories;
   3. ensure that all paths to TTFontLoader disable complex script feature
   parsing when disabled at a higher configuration layer;


[1] https://issues.apache.org/jira/browse/FOP-2197

Reply via email to