Jeremias Maerki [Mon, 16 Feb 2009 08:09:29 +0000 (08:09 +0000)]
Now using the "font" filter list entry for font streams.
Made T1 and TTF streams children of a commons base class.
Refactored default filter addition a bit.
Jeremias Maerki [Sun, 15 Feb 2009 16:38:14 +0000 (16:38 +0000)]
Fixed IllegalArgumentException (no object number assigned) for this makeLink method. It makes no sense to add this to the trailer objects AFAICS. This particular method is only used by PDFGraphics2D's makeLink() method (SVG's #svgView(viewBox()) functionality). The positioning of the viewbox is still wrong, though. It must have been broken at some point.
Jeremias Maerki [Wed, 11 Feb 2009 08:41:04 +0000 (08:41 +0000)]
Bugzilla #46686:
Use temporary directory for the font cache if the user home directory is not write-accessible.
Submitted by: Alok Singh <alok.at.jivesoftware.com>
Modifications to patch by jeremias:
- Bugfix: original code switched to temporary directory if the .fop directory already existed in user home.
Jeremias Maerki [Mon, 9 Feb 2009 16:58:29 +0000 (16:58 +0000)]
Added code to detect when a Type 1 font is not configured to use its native encoding. In such a case it needs to be re-encoded in PostScript. That used to always happen in earlier FOP versions but since support was added for all glyphs in a font, this has become a problem. So this change restores the behaviour of before when XML font metrics files or just the PFM are used.
Jeremias Maerki [Mon, 9 Feb 2009 15:29:33 +0000 (15:29 +0000)]
Bugzilla #45342:
AFP Fonts: Fixed interpretation of metric for fonts with fixed metrics and made sure all repeating groups in FNP (Font Position) are processed.
Submitted by: Emil Maskovsky <styryx.at.seznam.cz>
Modifications to patch by jeremias:
- Style changes (tabs, variable names, javadocs)
- Fixed handling of spaces in URLs (as in IF branch)
- Modified the way the metrics are calculated (Emil's solution didn't produce the values required by FOP)
Jeremias Maerki [Thu, 5 Feb 2009 10:40:52 +0000 (10:40 +0000)]
AFP Output: Added a configuration option to override the resource level defaults in the code. The chosen defaults in code may not always be the best. For example, a user reported that they can't use print-level images for some reason and it is not possible to switch on inlining for background images.
Jeremias Maerki [Wed, 4 Feb 2009 10:10:13 +0000 (10:10 +0000)]
Trying to work around a problem with Java 1.4 when spaces are in Ant's basedir property as happened on my local Hudson instance because I had spaces in the Hudson job name.
Jeremias Maerki [Wed, 4 Feb 2009 09:28:48 +0000 (09:28 +0000)]
Fixed classpath problem concerning XMLUnit.
Split JUnits targets into a reduced set (without layout engine tests) and a full set.
Reactivated "gump" target and assigning it the reduced set. I want to see if Gump can do a bit more of our test suite without failing.
Bugzilla #46638: MinOptMaxUtil.toMinOptMax was converting LengthRangeProperty objects into illegal MinOptMax objects (in some cases opt could be inferior to min).
Bugzilla #46315: extension to disable column balancing before blocks spanning the whole page, in multiple-column documents.
Patch submitted by Georg Datterl, applied with some modifications (mainly Checkstyle issues)
Jeremias Maerki [Wed, 28 Jan 2009 13:30:22 +0000 (13:30 +0000)]
Updated dependency list.
Added XMLUnit 1.2 as we've already got many other build-only third-parties in lib/build and adding XMLUnit makes FOP easier to set up in an IDE.
Jeremias Maerki [Wed, 28 Jan 2009 11:10:51 +0000 (11:10 +0000)]
Moved MonochromeBitmapConverter from PCL to utility package for later reuse in AFP.
Moved BitmapImageUtil to a subpackage under util.
Added support for creating (hard) page segments for images when working in bi-level mode. Include Image Object (IOB) is a newer feature and not supported everywhere. Since page segments cannot be scaled, they have to be generated for each distinctive target size.
Bugfix: Reduced maximum chunk sizes for GraphicsData and ImageObject to conform to interchange set 1.
Bugfix: Removed PresentationSpaceResetMixingTriplet which is not allowed in interchange set 1.
Bugfix: Removed invalid byte in IDE Structure Parameter.
Added support for creating FS10 images for bi-level bitmaps for better interoperability.
Disabled optional and unnecessary name in ImageSegment. This name is never referenced.
Refactored environment groups a bit to avoid duplicate data structures due to subclassing.
Added explicit MappingOptionTriplet for image scaling.
Jeremias Maerki [Sun, 18 Jan 2009 12:48:58 +0000 (12:48 +0000)]
A bit of housekeeping:
- one site is infected with a Trojan horse
- Assentis no longer supports FOP
- removed dead links
- added xmlroff to complete the list of open source implementations
- PDFBox has migrated
Jeremias Maerki [Fri, 16 Jan 2009 14:20:59 +0000 (14:20 +0000)]
Bugfix: Weave included page segments into the object sequence instead of inserting them at the beginning. Otherwise they can be overpainted by marks that would otherwise lay under the page segment.
Jeremias Maerki [Thu, 15 Jan 2009 16:54:45 +0000 (16:54 +0000)]
Added in support for subtractive mode in 1-bit images. This should further reduce AFP file sizes for certain images.
We need to change the way the AFP library works in the long term. Adding one boolean flag causes changes in 5 different classes. That can't be it.
Jeremias Maerki [Thu, 15 Jan 2009 15:51:36 +0000 (15:51 +0000)]
Extracted some bitmap handling functions from the PCL implementation into new BitmapImageUtil class.
Added limited support for more efficient image encoding in AFP. Where possible the raw image data from the RenderedImage is used. Limitations include:
- missing support for color lookup tables (IndexColorModel)
- monochrome images: additive/subtractive flag is not supported by the AFP library, yet.
Images with fewer bits per pixel than specified in the configuration are no longer blown up to 4, 8 or even 24 bits.
Jeremias Maerki [Wed, 7 Jan 2009 08:49:29 +0000 (08:49 +0000)]
Give javadoc utility some more memory to avoid OutOfMemoryErrors.
Some additional package description and better package grouping.
Handle @event.severity tag.
Jeremias Maerki [Mon, 5 Jan 2009 07:47:02 +0000 (07:47 +0000)]
FOP now creates ToUnicode CMaps for single-byte fonts that don't use built-in encodings to help PDF text extractors interpreting characters.
PDF CMaps now support single-byte characters.
Jeremias Maerki [Sun, 4 Jan 2009 12:59:29 +0000 (12:59 +0000)]
Added support for forcing single-byte encodings for TrueType fonts without creating an XML font metric file (see "encoding-mode" attribute on "font" element in updated documentation).
See also Acrobat PDF merge performance problem on fop-users: http://markmail.org/message/dbbaaht4qshhqs3v
Bugzilla 46319:
Fixed a memory-leak in Marker.MarkerAttribute, where an instance was used as both key and value
in a WeakHashMap, effectively neutralizing the benefit of using WeakReferences.
Solved by extending PropertyCache to work for MarkerAttributes as well.
Jeremias Maerki [Sun, 7 Dec 2008 12:28:27 +0000 (12:28 +0000)]
FopCharacterSet doesn't follow the same contract as its superclass. The metrics must not be multiplied by the font size in the FopCharacterSet class. Only RasterFont or OutlineFont should do that.
Minor changes; mostly code- and javadoc-aesthetics...
Most notable:
- made most member variables private (apart from objectCount, which is used by PDFFactory)
- the number of fully qualified collection names warranted separate import statements
- replaced a String concat with StringBuffer.append()
- some javadoc nits, reduce space in single-line, add space in multi-line, added some @links ...
Adrian Cumiskey [Thu, 27 Nov 2008 10:37:43 +0000 (10:37 +0000)]
* Text encoding is now handled by PresentationTextData and character set encoding errors are now handled by AFPEventProducer.
* Moved AFPEventProducer from org.apache.fop.render.afp package to org.apache.fop.afp package.
Adrian Cumiskey [Wed, 26 Nov 2008 13:45:04 +0000 (13:45 +0000)]
Merged revisions 719616,719629,719646,719654 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r719616 | jeremias | 2008-11-21 16:07:58 +0000 (Fri, 21 Nov 2008) | 1 line
Added support for SVG 1.2 inside fo:instream-foreign-object. The code just used the basic SVGDOMImplementation for SVG 1.1. Now it delegates the DOM building to Batik code instead of to a normal DOM builder.
........
r719629 | jeremias | 2008-11-21 16:33:33 +0000 (Fri, 21 Nov 2008) | 2 lines
Fix for unit test failure in transcoder tests (NullPointerException):
Have to pass the root PSGraphics2D to NativeTextHandler instead of the PSGenerator as this one hasn't been initialized in PSGraphics2D when the NativeTextHandler is built in AbstractPSTranscoder.
........
r719646 | jeremias | 2008-11-21 17:24:32 +0000 (Fri, 21 Nov 2008) | 1 line
Fixed possible ClassCastException that was caused by my earlier attempt to support SVG 1.2. Batik's SAXSVGDocumentFactory doesn't currently deal well with the case when namespaces are declared outside of its scope. Worked around that by doing the SVG version detection in FOP code. SVG12DOMImplementation is obtained by reflection in order to keep backwards compatilibility with earlier Batik versions that don't support SVG 1.2.
........
r719654 | jeremias | 2008-11-21 17:44:08 +0000 (Fri, 21 Nov 2008) | 1 line
Adrian Cumiskey [Tue, 25 Nov 2008 18:34:05 +0000 (18:34 +0000)]
* Reverted back the interface changes I made to ImageHandler.
* Created AbstractAFPImageHandlerRawStream base class to handle raw image streams for AFP.
* Fixed a bug in handling native embedded TIFF images.
I think its finally ready to roll now guys, sorry for the last minute glitches.
My apologies for not finding time to respond to the fop-dev mailing list this afternoon but have been trying to put my efforts into applying the final touches to the branch. If my good lady allows I'll respond to your comments later this evening :).
Jeremias Maerki [Fri, 21 Nov 2008 17:24:32 +0000 (17:24 +0000)]
Fixed possible ClassCastException that was caused by my earlier attempt to support SVG 1.2. Batik's SAXSVGDocumentFactory doesn't currently deal well with the case when namespaces are declared outside of its scope. Worked around that by doing the SVG version detection in FOP code. SVG12DOMImplementation is obtained by reflection in order to keep backwards compatilibility with earlier Batik versions that don't support SVG 1.2.
Jeremias Maerki [Fri, 21 Nov 2008 16:33:33 +0000 (16:33 +0000)]
Fix for unit test failure in transcoder tests (NullPointerException):
Have to pass the root PSGraphics2D to NativeTextHandler instead of the PSGenerator as this one hasn't been initialized in PSGraphics2D when the NativeTextHandler is built in AbstractPSTranscoder.
Jeremias Maerki [Fri, 21 Nov 2008 16:07:58 +0000 (16:07 +0000)]
Added support for SVG 1.2 inside fo:instream-foreign-object. The code just used the basic SVGDOMImplementation for SVG 1.1. Now it delegates the DOM building to Batik code instead of to a normal DOM builder.
Adrian Cumiskey [Fri, 21 Nov 2008 14:29:17 +0000 (14:29 +0000)]
<svg:image/> y-axis positioning fix in AFPGraphics2D.
GraphicsState inner class created in GraphicsObject.
Unused methods setFill() and incrementPageFontCount() removed.
Adrian Cumiskey [Thu, 20 Nov 2008 16:44:30 +0000 (16:44 +0000)]
Merged revisions 718666,718705,719038,719110 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r718666 | adelmelle | 2008-11-18 17:58:54 +0000 (Tue, 18 Nov 2008) | 1 line
Bugfix: do not reset TextLM.hasChanged, but combine (||) with previous value.
........
r718705 | adelmelle | 2008-11-18 20:14:22 +0000 (Tue, 18 Nov 2008) | 1 line
Change FontCache.changeLock to a boolean[1], so it can be serialized...
........
r719038 | jeremias | 2008-11-19 19:46:45 +0000 (Wed, 19 Nov 2008) | 1 line
Reduced warning on ascender+descender > EM box to DEBUG level, as this case is compensated for by additional code in guessVerticalMetricsFromGlyphBBox() and is therefore only confusing. I tested problematic fonts and they show an acceptable line layout. No semantics changed.
........
r719110 | adelmelle | 2008-11-19 22:45:06 +0000 (Wed, 19 Nov 2008) | 3 lines
Bugzilla 46240:
Fixed a bug in combining break-before with a span change.
........
Adrian Cumiskey [Thu, 20 Nov 2008 16:38:44 +0000 (16:38 +0000)]
SetCurrentPosition fix for line drawing.
AbstractPaintingState push(), pushAll(), pop(), popAll() renamed to save(), saveAll() and restore(), restoreAll().
Some Javadoc improvements/updates.
Added Completable, Startable object writing interfaces.
StructuredDataObject interface renamed to StructuredData.
High level DataStream class moved from afp.modca to afp package.
Graphics*Relative objects removed and feature provided by absolute implementation.
GraphicsArea broken into GraphicsAreaBegin and GraphicsAreaEnd since areas are able to span more than one segment.
Improvement in SetLineWidth thickness precision.
Jeremias Maerki [Wed, 19 Nov 2008 19:46:45 +0000 (19:46 +0000)]
Reduced warning on ascender+descender > EM box to DEBUG level, as this case is compensated for by additional code in guessVerticalMetricsFromGlyphBBox() and is therefore only confusing. I tested problematic fonts and they show an acceptable line layout. No semantics changed.
Adrian Cumiskey [Tue, 18 Nov 2008 14:13:51 +0000 (14:13 +0000)]
Removed AbstractGraphics2DImagePainter and Graphics2DImagePainterGOCA (painting preparator mechanism).
Adjusted AFPGraphics2D to TextHandler changes in XG commons.
Factored an AbstractFOPTextPainter which is extended by AFPTextPainter.
Improved the FAQ by creating a separate entry for the problem about keep-together on table-cell, and the added support for inline keeps in 0.95
........
r718570 | jeremias | 2008-11-18 13:16:32 +0000 (Tue, 18 Nov 2008) | 1 line
Bugzilla 46211:
Fixed some multi-threading issues in FontCache.java (+ some minor cleanup: simplification of conditionals)
Thanks to rogov.AT.devexperts.com for tracing and reporting the problem.
........
r718502 | adelmelle | 2008-11-18 06:43:08 +0000 (Tue, 18 Nov 2008) | 1 line
Bugzilla 46211:
Fixed some multi-threading issues in FontCache.java (+ some minor cleanup: simplification of conditionals)
Thanks to rogov.AT.devexperts.com for tracing and reporting the problem.
Adrian Cumiskey [Thu, 13 Nov 2008 16:11:58 +0000 (16:11 +0000)]
* PDFImageHandler interface split into ImageHandler and PDFImageHandler.
* Deleted AFPDataObjectInfoProvider and AFPImage*Factory implementations, and abstracted AbstractImageHandlerRegistry from PDFImageHandlerRegistry, creating AFPImageHandlerRegistry and AFPImageHandler so there is a common reuse of image handling implementation between AFP and PDF now.
* RendererContext instantiation is now overridable in PrintRenderer.
* Created AFPRendererContext that is able to provide AFPInfo.
* toString() added to RendererContext for ease of use.
* Removed GraphicsObjectPainterAFP.
* Added package.html for AFP (sub)packages.
* Abstracted AbstractFOPBridgeContext from PDFBridgeContext and provided AFPBridgeContext implementation.
* Abstracted AbstractFOPTextElementBridge from PDFTextElementBridge and provided AFPTextElementBridge implementation.
* Abstracted AbstractFOPImageElementBridge from PDFImageElementBridge and provided AFPImageElementBridge implementation.
* Provided inline image support/handling in AFPGraphics2D for SVG.
* Created NativeImageHandler interface.
* Fix for path iterator filled line drawing in AFPGraphics2D adding coordinate drawing implementations GraphicsLineRelative and GraphicsFilletRelative (Thanks for the patch Jeremias).
* Improved configuration.xml documentation for images mode/native setting in AFP renderer configuration.