- Fixed the rendering of the area of a table corresponding to border-separation, which must be filled with the background of the table, and not the rows.
- Improved conformance: even if a table-cell spans several rows its background must correspond to the first row spanned.
- Added support for background on fo:table-column and fo:table-header/footer/body
TODO more testcases needed, especially tables with collapsing border model and tables broken over pages
Jeremias Maerki [Tue, 4 Mar 2008 17:35:52 +0000 (17:35 +0000)]
Update FOP poster for OpenExpo 2008 in Bern.
This fixes various warnings, updates the history and simplifies configuration (if you're on Windows, it will work out of the box because all fonts are available).
Jeremias Maerki [Tue, 4 Mar 2008 17:30:40 +0000 (17:30 +0000)]
Bugfix: If there's shrink available in an auto-height situation, the difference is now set to 0 in order to avoid unwanted effects. IOW, never shrink in an auto-height situation.
Jeremias Maerki [Tue, 4 Mar 2008 11:50:34 +0000 (11:50 +0000)]
Renamed to 0.95beta.
Made changes and release notes work again by switching to the projectInfo plug-in rather than relying on our local copy of the stylesheets. There's a little bug (missing images) in the release notes for which I submitted a patch (https://issues.apache.org/jira/browse/FOR-1076) to Forrest.
Brought status.xml more in line with the official status DTD.
Jeremias Maerki [Tue, 4 Mar 2008 09:15:50 +0000 (09:15 +0000)]
Using Forrest Trunk from now on (in order to use FOP 0.94 for PDFs). We'll switch to a stable release as soon as a release with a new FOP version is available.
Jeremias Maerki [Mon, 3 Mar 2008 07:51:14 +0000 (07:51 +0000)]
Tried to make font configuration easier to understand by splitting the basics from the advanced stuff. Otherwise, people will believe for the next 100 years that generating XML font metrics file is still always necessary.
Jeremias Maerki [Fri, 29 Feb 2008 14:03:01 +0000 (14:03 +0000)]
Bugfix: Disabled setting widths from AFM since we're using WinAnsiEncoding internally but the AFM delivers the character widths using the font's native encoding which causes problems with some characters.
Jeremias Maerki [Tue, 26 Feb 2008 11:07:20 +0000 (11:07 +0000)]
Reverted revision 603590 which broke the AFP renderer. The other changes after revision 603590 should be preserved as well as possible, including the switch to the new image library.
Adjustments for change in behaviour of the block viewport CTM.
Bugfix: SVG painting is now always done on a color canvas (like for PCL) because Batik cannot handle gradients on a grayscale canvas.
- added full support for keep-with-previous on table-row and in table-cell
- added more testcases for keeps in tables
- assign the right table-row element to grid units that are not on the first row spanned
- slightly re-worked the RowGroupBuilder interface to make it more SAX-like
Jeremias Maerki [Tue, 19 Feb 2008 15:47:48 +0000 (15:47 +0000)]
Added support for reading the OS/2 table's usWeightClass value which supports the same font weight values as we use in XSL-FO.
However, in my tests these values proved to be unreliable (like ExtraBlack fonts returning 400). I just hooked the whole thing in so this work isn't lost if anyone has an idea to make it work. The FontInfoFinder will continue to only use guessed font weights for now.
Jeremias Maerki [Tue, 19 Feb 2008 13:08:39 +0000 (13:08 +0000)]
Bugzilla #44451:
The patch fixes two problems:
- If distinct fonts declare the same font family name, the resulting font mapping is currently arbitrary; now, a name-similarity heuristic is used to prioritize the font mappings.
- "Medium" and "demi" fonts are now recognized as "bold", solving several real-world problems (although this solution may be an oversimplification).
Submitted by: Justus Piater <justus-bulk.at.piater.name>
Patch modified by jeremias:
- Style fixes (tab chars)
- Refined font weight identification: medium -> 500, semi/demi -> 600
Jeremias Maerki [Mon, 18 Feb 2008 15:02:39 +0000 (15:02 +0000)]
fop-rgb-icc() function did not make the round-trip which caused an error in the color_1.xml test case (intermediate format tests). Added a unit test to test the parsing and round-trip.
Documented the cmyk() function.
Jeremias Maerki [Mon, 18 Feb 2008 09:41:03 +0000 (09:41 +0000)]
Extract original exception in BasePDFTestCase.java. They are normally embedded in a TransformerException and sometimes additionally in a SAXException (depending on the JAXP implementation).
Restore validation for Base14 font check when PDF/A is active. Got lost when I refactored to generic structures in the PDF library.
Jeremias Maerki [Sat, 16 Feb 2008 12:28:48 +0000 (12:28 +0000)]
Extracted most of the code in CodePointMapping (generated by XSLT) into a base class for easier maintenance and proper Javadocs.
Deprecated FOP's copy of Glyphs.java.
Took a different approach at handling mapping alternatives for single-byte fonts. The AFM now only lists the main character. Substitution is done through Glyphs.java later in CodePointMapping.
Fixed a problem in Type1FontLoader where the PFM overrides asc/desc/cap/x even though the AFM provides the values. It showed itself because the URW Symbol font has wrong values in the PFM.
Added a note to myself in Type1FontLoader to implement the "Flags" value. The whole thing still seems to work without that part.
Added a glyph name list to the CodePointMapping so we can work with the original list from the AFM. Otherwise, various mapping operations to and from resulted in unwanted mappings (because the mappings are not necessarily 1:1) and in the end the PDF received an incorrect Encoding map. Now there's no such problem anymore.
rowStarted doesn't need to be set in the signalNewRow method. If it is, it will prevent the startTablePart event from being triggered on RowGroupBuilder, in addChildNode. This will lead to a NPE being thrown in CollapsingBorderResolver because it would be improperly set up.
Jeremias Maerki [Thu, 14 Feb 2008 10:41:26 +0000 (10:41 +0000)]
Fix problem with alternate Unicode code point overriding existing better ones in CodePointMapping (ex. a char code for NBSP was used in place of SPACE for non-standard encodings).
Made PFM completely optional if an AFM is available. Widths and Kerning are now also read from the AFM. Fallbacks for missing values are in place. If both AFM and PFM are available, both are used to get the best possible result for certain metrics.
Adrian Cumiskey [Thu, 14 Feb 2008 10:12:48 +0000 (10:12 +0000)]
When I first saw this it surprised me, it seems to have been here for quite some time.
The code block directly following this if/else condition was identical so I removed the copy/paste duplication and refactored it.
Jeremias Maerki [Thu, 14 Feb 2008 08:12:34 +0000 (08:12 +0000)]
Added support for Type 1 fonts which don't use the AdobeStandardEncoding for PDF and PS output. Details:
Added an Type 1 AFM parser (only basic ltr script fonts are properly supported).
Font loading changed slightly to allow loading an AFM in addition to a PFM.
Added some mapping functionality to CodePointMapping. Now we also build custom CodePointMapping instances from AFM files and use it in SingleByteFonts.
Changed more PDF object classes to make use of the generic PDFDictionary and PDFArray base classes.
Type 1 Fonts with a special encoding now register their encoding in the Encoding value of the font dictionary so the mapping is correct. For PS this isn't necessary as the interpreter just uses the font's default encoding.
Refactored CMap building code to it can also be used outside the PDF context. A CMap can now also be built from a single byte encoding.
Update of XML Graphics Commons snapshot.
Correction/Rectification of changes made in r617989:
* adjustment in ColorUtil to cater for the change
* added check to the color_1.xml testcase, checking for bug 43705
Some minor tweaks:
* added convenience shortcut to PropertyInfo to get to the user agent.
* replaced occurrences to use the shortcut in PropertyParser and RGBColorFunction.
* PropertyParser -> 0% of a length always yields FixedLength.ZERO_FIXED_LENGTH
Simon Pepping [Fri, 8 Feb 2008 19:20:27 +0000 (19:20 +0000)]
In addKnuthElementsForBorderPaddingXXX, if the returnlist is a
BlockKnuthSequence, the border and padding should be added to the
first or last paragraph inside it, but it is too late to do that
now. At least, avoid adding it to the bpd sequence.
Removed the 900 penalty mechanism which anyway almost always produced visually bad results. Now the first step for a row is computed so that each cell starting on it can contribute some content.
Used a similar mechanism to replace backtracking: the current row is now allowed to grow as long as there is not enough space on the current page to make the next row fit. The next row is "delayed", so this mechanism is called "row-delaying"
Tweak: modify PercentLength.toString() to return a value that facilitates debugging.
Moved the original code to a getString() implementation, which is now used by the fotree test suite.
Tweak: early percentage resolution by the parser (if the base is known and absolute). Reduces the number of PercentLength instances in favor of cached FixedLengths.
Jeremias Maerki [Thu, 7 Feb 2008 15:42:03 +0000 (15:42 +0000)]
Bugfix for date formatting with negative time zones in the PDF's Info object.
Update of xmlgraphics-commons-1.3.jar because of a similar bug with formatting dates in XMP.
Jeremias Maerki [Thu, 7 Feb 2008 14:02:44 +0000 (14:02 +0000)]
Added an option to disable the default sRGB profile in PDF output for those who don't care about color fidelity, but care about PDF file size. Note that this option is not possible if PDF/A, PDF/X or an output profile is used. Makes simple PDFs about 4KB smaller. Ha!
Jeremias Maerki [Wed, 6 Feb 2008 14:07:03 +0000 (14:07 +0000)]
Bugzilla #36391:
Fixed problem with positioning of content when reference-orientation="180" is used. CTM is now correct. It is updated after the height of the content is known. Instead of somehow inverting the element list, I've simply declared this case non-breakable, i.e. I generate one box.
Fixed a few other problems mostly occurring when rotating block-container content by 90 or 270 degrees plus a few remaining auto-height handling problems. This involved switching off some sometimes unwanted side-effects from auto-updating the BPD in some area classes.
Bugzilla 43705:
Fixed a bug when the rgb-icc() function was used before the fo:declarations,
or in documents without fo:declarations. Function now correctly (?) reverts
to the sRGB fallback in those cases.
Added very basic parsing for the xml:lang shorthand.
No validation of the specified value, but the language and country
properties now do take the shorthand into account to determine their
value.
Further cleanup/refinement of FixedLength:
* improve consistency in use of the PropertyCache
remove public constructor -> replaced by getInstance() in a handful of classes
* added a sourceResolution parameter to getInstance() and the private
constructor to allow better handling of device-dependent units (px)
Bugzilla 44343:
Fixed a bug when using relative (smaller/larger) font-sizes in combination with percentages.
Percentages now resolved as per the spec (XSL-FO 1.1 7.9.4):
"A percentage value specifies an absolute font size relative to the parent element's font-size."
Jeremias Maerki [Fri, 1 Feb 2008 16:02:33 +0000 (16:02 +0000)]
Move sRGB installation into the PDF library. That way it can be used in PDFDocumentGraphics2D, too (via AbstractImageAdapter).
Ensures correct handling of sRGB images in PDFTranscoder.