DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41831>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41831





------- Additional Comments From [EMAIL PROTECTED]  2007-04-02 02:40 -------
Hi Keith,

Many thanks for trying out the patch and taking the time to provide me with
feedback.  My comments are below.

(In reply to comment #17)
> I tried out this patch on Ubuntu Linux and found that I needed a few changes 
> to
> get it to work properly. Since this hasn't been checked in, I'm not sure what 
> to
> send a patch against, so I'll just describe them for now.
> 
> org.apache.fop.fonts.autodetect.UnixFontDirFinder
> It is probably worth adding the .fonts directory in a user's home directory: 
> e.g.
> 
> UNIX_FONT_PATHS = {
>         System.getProperty("user.home") + "/.fonts",

Ok this is a nice easy addition.  Andreas, if you are reading this
I believe you have made some small changes.  Before I make any of the changes
that Keith suggests, it might be a good idea for you to attach an additional
patch file with your changes.

> org.apache.fop.fonts.autodetect.FontFileFinder.find should have the recursive
> argument set to true when called from
> org.apache.fop.fonts.autodetect.NativeFontFileFinder.find, because the fonts 
> are
> found several layers deep under /usr/share/fonts.

I am thinking that I may make the NativeFontFileFinder class a little more
flexible so that implementing classes are able to specify whether each
individual search file path should be searched recursively or not.

> 
> org.apache.fop.fonts.autodetect.FontInfoFinder
> If you use 
> embedUrl = fontFile.toURI().toURL().toExternalForm();
> then it seems to do escaping of spaces, otherwise font filenames containing
> spaces cause problems.

This is also a quick easy change.

> It is probably worth handling UnsupportedOperationException within the
> org.apache.fop.fonts.autodetect.FontInfoFinder.find() method to prevent one 
> bad
> font breaking everything. I find "OpenType fonts with CFF data are not
> supported, yet" errors thrown by org.apache.fop.fonts.truetype.TTFFontLoader
> break the caching otherwise.

Yes this is a case I did not cater for.  I will change this.

> I'm not convinced that the cache is working properly for failed fonts, 
> because I
> always seem to get log messages about them, not just on the first run. 
> However,
> I haven't had time to investigate that properly.

I believe this to be working fine.  Bad/failed fonts are also recorded in the
cache.  The error is still printed to remind the user of the problem but the
font is not parsed again unless the file has been changed.

Thanks again Keith for taking time to try out the patch and provide feedback 
:-).

Cheers,

Adrian Cumiskey.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to