Re: font loading vagaries
I never looked at this part of the code but I would guess that this is due to Batik since it uses the system fonts? So I suspect this auto detection may be needed. On 1/22/13 7:30 PM, Glenn Adams wrote: 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; Comments? [1] https://issues.apache.org/jira/browse/FOP-2197
Re: font loading vagaries
Hi Glenn, 2013/1/22 Glenn Adams : > 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: > > ensure that we aren't using auto font detection when running any junit tests > unless we are specifically testing auto detection functionality; I agree > ensure that auto font detection, when it should and must run, does not > search outside of its intended directories; do you speak about recursion? if yes, so there is place for some improvement: allows/forbid recursion in configuration > ensure that all paths to TTFontLoader disable complex script feature parsing > when disabled at a higher configuration layer; that makes sense > Comments? > > [1] https://issues.apache.org/jira/browse/FOP-2197 -- pascal
font loading vagaries
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; Comments? [1] https://issues.apache.org/jira/browse/FOP-2197