Jeremias Maerki [Fri, 9 Nov 2007 08:33:52 +0000 (08:33 +0000)]
Bugfix: An invalid PDF was created if a grayscale JPEG image with an sRGB profile was embedded undecoded. I didn't find any other way than to disable the the ICC profile in this case.
Jeremias Maerki [Thu, 8 Nov 2007 18:36:01 +0000 (18:36 +0000)]
Another improvement for font auto-detection:
Some TrueType fonts have multiple font family names which we haven't extracted so far. All these names are now exposed as a Set of Strings.
An example: Futura Book BT has two font families: Futura (Mac platform) and Futura Bk BT (Windows platform).
Jeremias Maerki [Thu, 8 Nov 2007 15:13:24 +0000 (15:13 +0000)]
Improved font auto-detection and handling of AWT-supplied fonts in order to achieve better results when using multiple output formats. Whenever possible, the font names appearing in the operating system can also be used in XSL-FO.
Better distinction between Font Family Name ("Arial"), Full Font Name ("Arial Bold") and PostScript Name ("Arial-BoldMT"). This allows a better generation of FontTriplets. The same is done for AWT fonts where I have switch from font-family detection to enumerating all java.awt.Font instances so I can extract Family Name, Full Name and PostScript Name. FontInfoFinder and AWT's FontSetup are synchronized as well as possible at this time.
Register "extra-bold" (weight 800) and "light" (weight 200) in triplets when detected.
Tweaked FontInfo.fontLookup() for better fallback behaviour. This approach is rapidly nearing its flexibility limits. We should rethink the FontTriplet structure.
Fixed font-autodetection so fonts with uppercase extensions are detected, too.
Made the way TrueType fonts are embedded in PDF compliant to the specification so viewers correctly identify subset fonts. The name prefix in MultiByteFont was incorrect.
Support the detection of the special Type 1 Symbol font. Symbol used to be detected with "ExpertSubsetEncoding" instead of "SymbolEncoding".
Type1FontLoader tries to construct a "full name" from the PostScript name. This is a temporary hack until we have a PFB or PFA parser.
First step towards building row groups at the FO tree stage. The built row groups are currently not used and the TableRowIterator stuff remains unchanged; this allows for more atomic commits.
- introduced RowGroupBuilder hierarchy;
- moved TableRowIterator test cases into fotree, and integrated them in the test suite.
Jeremias Maerki [Sat, 3 Nov 2007 10:59:09 +0000 (10:59 +0000)]
Completely reimplemented the PDFTextPainter. All SVG text (including flow text, but excluding special cases with filters) is now painted in PDF text primitives.
The whole thing compiles against and runs with Batik 1.6 but was developed against Batik Trunk (1.7). The TextBridge for SVG 1.2 text is omitted because we're still on Batik 1.6 and FOP wouldn't compile with it. The full feature set is only available with Batik 1.7, of course. With Batik 1.6, font selection may not work as expected.
Jeremias Maerki [Sat, 3 Nov 2007 10:51:31 +0000 (10:51 +0000)]
More fine-grained mechanism to detect if a font has been used or not. If a font list is given for a text run and each character should be painted in the right font, it might be accessed but never really used. Needed for PDF text painting improvements.
Reworked the creation of implicit columns to match new behaviour: the number of columns of a table without explicit fo:table-column is set by the row that has the most columns.
Jeremias Maerki [Wed, 31 Oct 2007 16:39:04 +0000 (16:39 +0000)]
Some fonts have spaces in their names (ex. "Arial Unicode MS"). This change modifies font auto-detection so both "ArialUnicodeMS" (as before) and "Arial Unicode MS" (new) are registered for a font.
- Enforced check for proper number of columns in a table. Now if a table has explicit table-columns, those fix the total number of columns and any row having more columns will lead to an error.
- Set up a framework for unit-testing classes from the FO tree, and added some first testcases for the number of columns in tables.
Removed no longer useful setCurrentColumnIndex method on ColumnNumberManager. The column number is now automatically updated in signalUsedColumnNumbers
- factored the management of column numbers into a separate helper class
- moved the PendingSpan inner class from TableFObj into TableCellContainer, where it's a bit more appropriate
- simplified the getTable method in TableFObj by overriding it in Table
- simplified the propertyMaker for column-number: now it's the table-cell which notifies the parent table-body that it starts a new row. As an additional benefit the propertyMaker for starts-row is now called only once, instead of twice before
- reworked, factored and simplified the handling of column indices in TableCellContainer
- bugfix: repeated fo:table-column were not added at the right place in the column lists
- bugfix: width set on cell on second row was applied to the column's width, whereas it shouldn't
- checkstyle cleanup
Adrian Cumiskey [Fri, 26 Oct 2007 19:20:02 +0000 (19:20 +0000)]
Applied [PATCH] 43143 - ExpertEncoding and ExpertSubsetEncoding not detected for Type 1 fonts
Many thanks to William (wliem AT allette DOT com DOT au) for reporting the problem.
NOTE: More work needs to be done to provide support for ExpertEncoding
(this is documented in src/codegen/fonts/encodings.xml within this patch).
Partially modified the patch due to code changes. Many thanks to Andrejus Chaliapinas for this patch :)
Submitted by: Andrejus Chaliapinas <a.chaliapinas.at.infosana.com>
Moved the creation of the columns list to the declaration of the columns field. Even if there are no explicit columns the list will have to be created anyway.
Created an abstract TableCellContainer class meant to contain the logic in TableRowIterator.
Factored some code common to TableBody and TableRow in it.
Jeremias Maerki [Fri, 26 Oct 2007 07:48:14 +0000 (07:48 +0000)]
Merged https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_PDF_in_PDF (563130:HEAD) into Trunk.
Adds generic structures in PDF so it is possible to embed external PDF documents, for example to support PDF files in fo:external-graphic for PDF output. See also: http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-dev/200708.mbox/%3c20070806165027.5C59.DEV@jeremias-maerki.ch%3e
I tried to keep the changes on the API of the PDF library minimal but there could still be some incompatibilities for anyone who uses it separately.
This also adds support for dynamically registering an image handler. That's just a temporary solution until the image package redesign is done. But it works.
Removed the check for borders specified on table-column/body/row in separate border model, since this is perfectly legal: they may be retrieved by specifying "inherit" on table-cells
Simon Pepping [Mon, 22 Oct 2007 19:10:23 +0000 (19:10 +0000)]
Removed the export statement, because it must be on a separate line in
plain-vanilla Bourne shells, and it is not needed. Restricted the
special setting of IFS to the section that requires it.
Jeremias Maerki [Tue, 16 Oct 2007 15:12:45 +0000 (15:12 +0000)]
Bugfix: If auto-detection is enabled, auto-detection didn't get done starting with the second rendering run in the same JVM. Static variables are dangerous!
Jeremias Maerki [Fri, 5 Oct 2007 13:33:45 +0000 (13:33 +0000)]
Configuration settings for "language-level" and "optimize-resources" got lost when the patch for revision 542237 got applied. This is restored now.
See http://svn.apache.org/viewvc?view=rev&revision=542237
Jeremias Maerki [Fri, 5 Oct 2007 12:34:33 +0000 (12:34 +0000)]
Bugzilla #43464:
There is no need to cast the sources into a StreamSource to determine
the SystemId. With this cast DOMSources or other non-StreamSources lead in a
ClassCastException.
Submitted by: Bruno Feurer <dev.at.brunof.com>
Jeremias Maerki [Fri, 5 Oct 2007 09:56:12 +0000 (09:56 +0000)]
Bugzilla #43439:
Fixed the restoration of the TLE values from the intermediate format for the AFP extension elements.
Submitted by: Adrian Cumiskey <dev.at.cumiskey.com>
Jeremias Maerki [Fri, 5 Oct 2007 08:48:15 +0000 (08:48 +0000)]
Bugzilla #43041:
Added a configuration setting for the renderer/device resolution to the AFP renderer.
Many Checkstyle violations fixed.
Submitted by: Adrian Cumiskey <dev.at.cumiskey.com>
Changes to the patch by jeremias:
- Bugfix: SVGs were rendered in the wrong size when the target-resolution and the renderer-resolution differ.
Chris Bowditch [Thu, 4 Oct 2007 13:56:55 +0000 (13:56 +0000)]
Bugzilla #43184
I checked in the changes to xmlgraphics-commons source repo, but forgot to commit the updated JAR to the FOP distro. So here it is.
Submitted by Adrian Cumiskey <dev.at.cumiskey.com>
PropertyCache phase 2:
* improvement of the PropertyCache itself should guarantee acceptable
performance of the static caches in multi-session environments, which is
a possible problem with synchronizedMap
* changed CommonFont to use the cache:
added CachedCommonFont to contain the properties that are always cacheable
CommonFont itself is only cached if the remaining properties are absolutes
* changed CommonHyphenation, KeepProperty, ColorProperty and FontFamilyProperty
to use the cache
Facilitate the implementation for font-selection-strategy:
* Changed FontInfo.fontLookup to always return an array of FontTriplet
* Changed CommonFont.getFontState to return an array of FontTriplet
* Initial modifications to the related LMs: initialized with
the font corresponding to the first of the triplets
This line, and those below, will be ignored--
M src/java/org/apache/fop/render/rtf/TextAttributesConverter.java
M src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
M src/java/org/apache/fop/fonts/FontInfo.java
M src/java/org/apache/fop/fo/properties/CommonHyphenation.java
M src/java/org/apache/fop/fo/properties/CommonAccessibility.java
M src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java
M src/java/org/apache/fop/fo/properties/FontFamilyProperty.java
M src/java/org/apache/fop/fo/properties/FixedLength.java
M src/java/org/apache/fop/fo/properties/PropertyCache.java
M src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
M src/java/org/apache/fop/fo/properties/CommonFont.java
M src/java/org/apache/fop/fo/properties/ColorProperty.java
M src/java/org/apache/fop/fo/properties/KeepProperty.java
M src/java/org/apache/fop/fo/PropertyList.java
M src/java/org/apache/fop/fo/FOPropertyMapping.java
M src/java/org/apache/fop/fo/expr/PropertyParser.java
M src/java/org/apache/fop/fo/expr/ICCColorFunction.java
M src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java
M src/java/org/apache/fop/fo/expr/RGBColorFunction.java
M src/java/org/apache/fop/fo/expr/SystemColorFunction.java
M status.xml
Fix behavior of from-nearest-specified-value(): the value should be that of 'the closest ancestor', so the iteration should start with the parent PropertyList.