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).
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.
Jeremias Maerki [Thu, 17 Dec 2009 14:31:07 +0000 (14:31 +0000)]
Fixed test case: 102 / 255 is 0.4, not 0.48. It is not the same as the previous check where no RGB replacement values are given but are calculated from the CMYK value.
Jeremias Maerki [Wed, 16 Dec 2009 10:47:04 +0000 (10:47 +0000)]
Added support for TrueType fonts with symbol character maps (like "Wingdings" and "Symbol"). Characters for these fonts are usually found in the 0xF020 to 0xF0FF range (a Unicode private use area).
There's also experimental support to additionally map these characters into the 0x0020 to 0x00FF range if no characters are mapped in this area. That means that that, for example, Wingdings' pen symbol can be accessed using 0xF021 and 0x0021.
Jeremias Maerki [Wed, 16 Dec 2009 10:06:16 +0000 (10:06 +0000)]
Bugfix for font selection fallbacks:
"Freestyle Script", for example, only has a single variant.
Freestyle Script,normal,100 was properly resolved to Freestyle Script,normal,400.
Freestyle Script,italic,400 was properly resolved to Freestyle Script,normal,400.
But Freestyle Script,italic,100 was resolved to the "any" font.
All combinations of weights and styles are now remaining on the same font family where possible.
Bugfix in Changing IPD: reset only the children LMs that have been created so far. Layout managers following a forced break have not even been created yet.
Bugzilla #48185: rounding error when computing the CMYK components of a color, in the AFP output.
Patch submitted by Harald G. Henne (initially in Bugzilla #48167)
Bugzilla #48167: when #CMYK pseudo-profile was used in the rgb-icc() function, always the fallback RGB colors were used instead.
Patch submitted by Venkat Reddy