https://issues.apache.org/bugzilla/show_bug.cgi?id=52257
--- Comment #5 from Vincent Hennebert <vhenneb...@gmail.com> 2011-11-30 17:16:55 UTC --- I had a quick look at the code and think the creation of a new DefaultEventBroadcaster instance can be avoided in most places: • In TTFReader and TTFFile it’s not necessary, a dedicated FontEventListener that logs events on the standard output would do. • In IFUtil: the setupFonts(IFDocumentHandler) method should be removed and restriction added that the fontInfo be not null. I don’t think that this class is an appropriate place to create new FontInfo instances. Anyway, most callers of this method probably already pass a non-null instance of FontInfo. • In NativeTextHandler, the only class that calls the constructor passes a non-null FontInfo instance, so the setupFontInfo method can be removed. • PDFDocumentGraphics2D and PDFDocumentGraphics2DConfigurator: those classes are only used by the transcoder IIC. An appropriate FontEventListener implementation should be used instead of a FontEventAdapter • In PDFGraphics2D.createPattern: this one is less clear. I’m not sure why a new FontInfo instance is being created while one is already available as a member. This would need to be further investigated, but it doesn’t seem that custom fonts are being configured, only the base 14 ones. So the FontEventListener can be a dedicated implementation that throws an AssertionError whenever an event occurs. Vincent -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.