Added ImageElementBridge to ImageConverterSVG2G2D so output formats like Java2D (PNG, TIFF) and PCL can load image formats other than just PNG and JPEG from SVG.
This also represents a work-around for certain JPEG images that cannot be loaded properly with the Sun JPEG codec embedded in the JDK. With this, JPEGs are loaded via ImageIO.
Bugfix for gradients with mixed color spaces: the original color was not replaced in the list which cause faulty PDFs.
Switched to using a more accurate conversion method to sRGB.
Cleanup of PDFColor, removing unused functionality. PDFColor is only used for transparent color of bitmap images in which case only sRGB and Gray are needed.
Restored ColorExt after removing it from XML Graphics Commons again.
Moved GrayScaleColorConverter as a package-local class from XGC to the AFP package (doesn't require deprecation when we can put the functionality in XGC later with the new color infrastructure).
Jeremias Maerki [Wed, 30 Jun 2010 12:36:00 +0000 (12:36 +0000)]
Added support for the cie-lab-color() function that is found in the current XSL 2.0 design notes.
Some refactoring of ColorUtil to reduce code duplication.
Jeremias Maerki [Fri, 25 Jun 2010 12:17:58 +0000 (12:17 +0000)]
Bugzilla #49403:
Initial support for PDF Separation color spaces (aka spot colors). This is still unfinished but produces valid PDF with Separation colors in simple cases.
Based on work by: Patrick Jaromin <Patrick.at.Jaromin.com>
Note: PDFColor is broken right now, as I'm planning to phase that class out. Squeezing separation colors and what else comes later into that class isn't such a good idea IMO. Instead, PDFColorHandler tries to do all that in a better way based on the new color support classes from XGC.
Minor refactoring and style fixups:
- private lineLayoutsList can be a primitive array
- eliminate some stray hungarians (inconsistent btw: iFirstIndex, but nEliminableLines...)
- inverted principal loop in createLineBreaks(), to make debugging less confusing (and preparation for partial fix of Bug 38264)
- compacted some boolean expressions ( (x ? true : false) -> plain x )
- removed some commented code
- extracted some code into processUpdates; findHyphenationPoints was getting too long
- minor javadoc fixups
Jeremias Maerki [Sat, 12 Jun 2010 08:19:48 +0000 (08:19 +0000)]
AFP Output Changes:
- Fixed positioning of Java2D-based images (when GOCA is enabled). GraphicsDataDescriptor had a bit order bug. The Graphics2D image handler didn't save state and reposition the image origin.
- Switched bitmap image handling in AFPGraphics2D to (re-)use AFPImageHandlerRenderedImage so it can profit from it's advanced image conversion functionality. This also avoids some bugs with certain image formats.
- Added enhanced dithering functionality for images that need to be converted to bi-level images.
Jeremias Maerki [Tue, 8 Jun 2010 19:01:56 +0000 (19:01 +0000)]
Bugzilla #42306:
Fix for AWT viewer to correctly track page numbers in continuous display mode.
Submitted by: Richard Wheeldon <richardw@geoquip-rnd.demon.co.uk>
Modifications to original patch:
- Small adjustments for out code conventions.
- Added some missing Javadocs.
Jeremias Maerki [Thu, 27 May 2010 19:20:54 +0000 (19:20 +0000)]
Big encoding performance improvement for bi-level images which do not have the right bit order. Apparently, setting the subtractive option doesn't help with inverting a bi-level FS10 image.
Jeremias Maerki [Thu, 20 May 2010 09:52:27 +0000 (09:52 +0000)]
Changed many variables and parameters from "int" to "char" because AFP font support mostly uses Unicode code points unlike Type 1 and TrueType support which use internal character code points (the result of Font.mapChar()). This should improve code readability.
Jeremias Maerki [Mon, 17 May 2010 11:41:33 +0000 (11:41 +0000)]
Don't fail on AFM just because it has a Start/EndTrackKern section. Log a warning instead of throwing an exception when an unimplemented feature is found.
Added a save/restoreGraphicsState pair for the initial coordinate system in PDF output for easier post-processing. The missing q/Q pair caused content to be upside-down when simply a new content stream is appended to the page. With this change the initial coordinate system is restored after FOP's stream is finished.
Chris Bowditch [Wed, 14 Apr 2010 15:38:20 +0000 (15:38 +0000)]
cache AFP Fonts in a similar manner to LazyFont class for TrueType fonts. This boosts performance when rendering a large batch of AFP documents in the same JVM
Now that the creation of event-model.xml has been standardised, the EventModelFactory mechanism is no longer needed. Removed all the factory classes.
Registration through META-INF/services also is no longer necessary.
Generate event models in the same directory as the corresponding EventProducer interfaces and name it event-model.xml by default
The eventResourceGenerator task now takes a destination directory parameter instead of modelfile
Split catch-all EventFormatter.xml message file into individual files for each EventProducer. There is no longer a default EventModelFactory
Added test case for font event
Jeremias Maerki [Thu, 18 Mar 2010 15:24:25 +0000 (15:24 +0000)]
Bumped xmlgraphics-commons.jar.
Added configuration option to tweak the image loader framework.
See also: http://svn.apache.org/viewvc?rev=924666&view=rev
Jeremias Maerki [Tue, 16 Feb 2010 09:36:40 +0000 (09:36 +0000)]
Bugzilla #48512:
Reverted rev 908543.
For some Type 1 fonts, the encoding mapped characters in the AFM file don't match the font's primary encoding. This change tries to address this fact.
Pascal Sancho [Mon, 15 Feb 2010 15:43:32 +0000 (15:43 +0000)]
Added complete list of 1.1 item in compliance page.
- Udated information for page-number-citation-last, content-width, content-height, and page-position
- Updated links for bookmarks
- retrieve-table-marker now related to fox:outline
Jeremias Maerki [Wed, 10 Feb 2010 15:37:04 +0000 (15:37 +0000)]
Bugzilla #48512:
Bugfix: Don't map AdobeStandardEncoding to StandardEncoding. They are not the same. Fixes problem with invalid character widths on PostScript output and missing umlauts.
Jeremias Maerki [Wed, 10 Feb 2010 08:53:05 +0000 (08:53 +0000)]
Bugzilla #48696:
Bugfix for color model in IOCA IDE structure parameter for 4- and 8-bit grayscale images.
Submitted by: Peter Hancock <peter.hancock.at.gmail.com>
Jeremias Maerki [Sat, 6 Feb 2010 18:19:31 +0000 (18:19 +0000)]
Related to Bugzilla #47232:
The same bug that existed for Type 1 fonts (fixed in rev 777459) also applies to TrueType fonts. The last glyph in a font was reported to have zero width. Bug exists since 2001.
Made part of setupsRGBColorProfile method synchronized to avoid ConcurrentModificationException when PDF documents are being produced in multiple threads
Jeremias Maerki [Thu, 21 Jan 2010 17:37:07 +0000 (17:37 +0000)]
Bugzilla #48567:
Initial support for CID-keyed double-byte fonts (Type 0) in AFP output.
Submitted by: Peter Hancock <peter.hancock.at.gmail.com>
Patch modified by jeremias:
- as discussed: removed fallback character code
- as discussed: changed "double-byte" to "CIDKeyed" for the font type.
- some cosmetic changes
- removed some dead code and commented code.
Updated reference accessible PDF files. Old ones had "Apache FOP Version SVN branches/Temp_Accessibility" as Creator and Producer values. New ones have "Apache FOP Version SVN trunk". This was causing spurious differences when testing PDF accessibility.
Jeremias Maerki [Fri, 1 Jan 2010 13:57:10 +0000 (13:57 +0000)]
Fixed a multi-threading bugfix, visible for example when opening examples/fo/basic/readme.fo with the AWT Preview. Words could be jumbled and the wrong fonts were sometimes used.
The class still has a performance problem concerning the use of the TextLayout class for determining some font metrics otherwise not available from the Java2D/AWT subsystem.