Jeremias Maerki [Tue, 20 Nov 2007 15:56:33 +0000 (15:56 +0000)]
Bugfix: Bugfix for URI resolution: Make StreamSources without system identifier work again.
Bugfix: Close streams opened by test font resolution in font configuration (the font URIs will be resolved again later anyway).
Better error message when the loading of font metric files doesn't work due to missing information in the returned Source instances.
Jeremias Maerki [Sun, 18 Nov 2007 16:56:09 +0000 (16:56 +0000)]
Bugzilla #43605:
Added methods for page-number-citation and page-number-citation-last in FOEventHandler.java
Submitted by: V. Schappert <vschappert.at.bloomberg.net>
Patch modified by Jeremias:
Bugfix: FOEventHandler.startPageNumberCitation() was also called in the case of a page-number-citation-last. Introduced abstract base classes to avoid this.
Jeremias Maerki [Sun, 18 Nov 2007 10:48:53 +0000 (10:48 +0000)]
ApacheCon US is over.
OSSSummit was cancelled/postponed.
Added example for total page count using XSL 1.1
Adjusted total page count example to new FOP API. (Thanks to Miroslav Gregan for the hint)
Jeremias Maerki [Thu, 15 Nov 2007 13:28:58 +0000 (13:28 +0000)]
Bugzilla #43143:
Had to remove the Expert(Subset) Encoding detection as this caused problems with a barcode font that used dfCharset=2 but was not using ExpertSubset encoding. To detect Expert(Subset)Encoding, the AFM needs to be parsed. And since we don't support that encoding, yet, the fallback to WinAnsiEncoding should work well enough.
Reduced visibility of some methods and constructors from public to package-private, as a consequence of the move of *GridUnit to the fo.flow.table package
Moved the creation of grid units to the FO tree building stage. Brought a few improvements along with the move:
- bugfix: border-resolution for border-end on row-spanning cells was wrong
- bugfix: in case of missing cells the border-end of the table was applied to an inner cell, instead of the cell in the last column (but missing cells aren't painted yet :-\)
- bugfix: in collapsing-border model, border-before and -after specified on table-column were applied to every cell of the column, instead of only the first and the last ones
- border resolution is now made progressively when possible, and no longer triggers the fetching of all the rows of the table
Added testcases for the border conflict resolution (between the various elements of a table and not only the cells)
Jeremias Maerki [Tue, 13 Nov 2007 12:44:29 +0000 (12:44 +0000)]
Filter single quotes from the filenames as this will interfere with font-family parsing.
Fixed bug: InputStream opened by URL.openConnection() wasn't closed which leads to "too many open files" when you have lots of fonts on Java 1.4.
Jeremias Maerki [Tue, 13 Nov 2007 12:40:38 +0000 (12:40 +0000)]
Improved PFM loading:
- Fixed bug with Flags (resulted in bad PDFs for certain fonts)
- Warn about possible charset problems.
- Fixed bug for "last char" (probably a copy/paste mistake)
Jeremias Maerki [Mon, 12 Nov 2007 09:40:16 +0000 (09:40 +0000)]
Avoid null values in generated Font classes so the encoding can be inspected.
Don't warn about missing hyphenation characters for fonts such as Symbol and ZapfDingbats which don't have the default hyphenation character.
Jeremias Maerki [Mon, 12 Nov 2007 08:27:46 +0000 (08:27 +0000)]
Issue a clear warning if the selected hyphenation character is not available in a font. Otherwise you'd just get a "glyph not available" error and you wonder why the hell FOP wants to use that character.
Jeremias Maerki [Sun, 11 Nov 2007 15:30:34 +0000 (15:30 +0000)]
Bugzilla #43835:
Bugfix: Use Font.getName() (logical font name) instead of Font.getFontName() (localized) when registering fonts from AWT.
Submitted by: David Churavy <churavy.at.kadel.cz>
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.