Author: jeremias
Date: Sun Jan 4 23:59:39 2009
New Revision: 731480
URL: http://svn.apache.org/viewvc?rev=731480&view=rev
Log:
Merge from Trunk revisions 728026 - 731479.
Added:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/EncodingMode.java
- copied unchanged from r731479,
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/EncodingMode.java
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/ (props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/trunk/fonts.xml
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/foschema/fop-configuration.xsd
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/FObj.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/EmbedFontInfo.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontLoader.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/LazyFont.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteEncoding.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/CMapBuilder.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFactory.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFont.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFontNonBase14.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFToUnicodeCMap.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/PrintRendererConfigurator.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFContentHandler.java
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFPainter.java
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFRenderer.java
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/java2d/ConfiguredFontCollection.java
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java
(props changed)
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/status.xml
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/layoutengine/disabled-testcases.xml
Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1,3 +1,3 @@
/xmlgraphics/fop/branches/Temp_AFPGOCAResources:630874-721418
/xmlgraphics/fop/branches/fop-0_95:684572,688085,688696
-/xmlgraphics/fop/trunk:603620-728025
+/xmlgraphics/fop/trunk:603620-731479
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/trunk/fonts.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/trunk/fonts.xml?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/trunk/fonts.xml
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/trunk/fonts.xml
Sun Jan 4 23:59:39 2009
@@ -367,7 +367,9 @@
<renderer mime="application/pdf">
<fonts>
<!-- register a particular font -->
- <font metrics-url="file:///C:/myfonts/FTL_____.xml" kerning="yes"
embed-url="file:///C:/myfonts/FTL_____.pfb">
+ <font metrics-url="file:///C:/myfonts/FTL_____.xml" kerning="yes"
+ embed-url="file:///C:/myfonts/FTL_____.pfb"
+ encoding-mode="single-byte">
<font-triplet name="FrutigerLight" style="normal" weight="normal"/>
</font>
@@ -393,6 +395,13 @@
<li>The font "kerning" attribute is optional. Default is "true".</li>
<li>If embedding is off (i.e. embed-url is not set), the output will
position the text correctly (from the metrics file), but it will not be
displayed or printed correctly unless the viewer has the applicable font
available to their local system.</li>
<li>When setting the "embed-url" attribute for Type 1 fonts, be sure
to specify the PFB (actual font data), not PFM (font metrics) file that you
used to generate the XML font metrics file.</li>
+ <li>The attribute "encoding-mode" is optional an may have the
following values:
+ <ul>
+ <li>auto: default font encoding mode ("cid" for Truetype,
"single-byte" for Type 1)</li>
+ <li>single-byte: use single-byte encodings in the target format
(if applicable)</li>
+ <li>cid: encode as CID-keyed font (currently only supported for
PDF output with TrueType fonts)</li>
+ </ul>
+ </li>
<li>The fonts "directory" tag can be used to register fonts
contained within a single or list of directory paths. The "recursive"
attribute can be specified to recursively add fonts from all sub
directories.</li>
<li>The fonts "auto-detect" tag can be used to automatically
register fonts that are found to be installed on the native operating
system.</li>
<li>Fonts registered with "font" tag configurations override fonts
found by means of "directory" tag definitions.</li>
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/foschema/fop-configuration.xsd
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/foschema/fop-configuration.xsd?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/foschema/fop-configuration.xsd
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/foschema/fop-configuration.xsd
Sun Jan 4 23:59:39 2009
@@ -219,6 +219,15 @@
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
+ <xsd:attribute name="encoding-mode" use="optional" default="auto">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="auto"/>
+ <xsd:enumeration value="single-byte"/>
+ <xsd:enumeration value="cid"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
</xsd:complexType>
<xsd:complexType name="fontTripletType">
<xsd:attribute name="name" type="xsd:string" use="required"/>
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler:699793-728025
+/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler:699793-731479
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/FObj.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/FObj.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/FObj.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/FObj.java
Sun Jan 4 23:59:39 2009
@@ -215,7 +215,7 @@
* @param parent the (cloned) parent node
* @throws FOPException when the child could not be added to the parent
*/
- protected static void addChildTo(FONode child, FObj parent)
+ protected static void addChildTo(FONode child, FONode parent)
throws FOPException {
parent.addChildNode(child);
}
@@ -573,11 +573,11 @@
}
}
- /** @return true if this FObj has extension attachments */
+ /** @return true if this FObj has extension attachments */
public boolean hasExtensionAttachments() {
return extensionAttachments != null;
}
-
+
/**
* Adds a foreign attribute to this FObj.
* @param attributeName the attribute name as a QName instance
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
Sun Jan 4 23:59:39 2009
@@ -30,8 +30,8 @@
import org.apache.fop.fo.FObjMixed;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.ValidationException;
+import org.apache.fop.fo.XMLObj;
import org.apache.fop.fo.flow.table.Table;
-import org.apache.fop.fo.flow.table.TableFObj;
/**
* Abstract base class for the <a
href="http://www.w3.org/TR/xsl/#fo_retrieve-marker">
@@ -102,7 +102,7 @@
getLocator(),
pList,
newPropertyList);
- addChildTo(newChild, (FObj) newParent);
+ addChildTo(newChild, newParent);
if (newChild.getNameId() == FO_TABLE) {
Table t = (Table) child;
cloneSubtree(t.getColumns().iterator(),
@@ -117,7 +117,9 @@
} else if (child instanceof FOText) {
FOText ft = (FOText) newChild;
ft.bind(parentPropertyList);
- addChildTo(newChild, (FObj) newParent);
+ addChildTo(newChild, newParent);
+ } else if (child instanceof XMLObj) {
+ addChildTo(newChild, newParent);
}
// trigger end-of-node white-space handling
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
Sun Jan 4 23:59:39 2009
@@ -20,7 +20,10 @@
package org.apache.fop.fo.properties;
import java.awt.Color;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import org.apache.xmlgraphics.image.loader.ImageException;
import org.apache.xmlgraphics.image.loader.ImageInfo;
import org.apache.xmlgraphics.image.loader.ImageManager;
import org.apache.xmlgraphics.image.loader.ImageSessionContext;
@@ -29,7 +32,9 @@
import org.apache.fop.datatypes.Length;
import org.apache.fop.datatypes.PercentBaseContext;
import org.apache.fop.datatypes.URISpecification;
+import org.apache.fop.events.ResourceEventProducer;
import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.FObj;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.expr.PropertyException;
@@ -362,6 +367,7 @@
&& !("".equals(newInstance.backgroundImage))) {
//Additional processing: preload image
String uri = URISpecification.getURL(newInstance.backgroundImage);
+ FObj fobj = pList.getFObj();
FOUserAgent userAgent = pList.getFObj().getUserAgent();
ImageManager manager = userAgent.getFactory().getImageManager();
ImageSessionContext sessionContext =
userAgent.getImageSessionContext();
@@ -369,10 +375,19 @@
try {
info = manager.getImageInfo(uri, sessionContext);
newInstance.backgroundImageInfo = info;
- } catch (Exception e) {
- Property.log.error("Background image not available: " + uri);
+ } catch (ImageException e) {
+ ResourceEventProducer eventProducer =
ResourceEventProducer.Provider.get(
+ fobj.getUserAgent().getEventBroadcaster());
+ eventProducer.imageError(fobj, uri, e, fobj.getLocator());
+ } catch (FileNotFoundException fnfe) {
+ ResourceEventProducer eventProducer =
ResourceEventProducer.Provider.get(
+ fobj.getUserAgent().getEventBroadcaster());
+ eventProducer.imageNotFound(fobj, uri, fnfe,
fobj.getLocator());
+ } catch (IOException ioe) {
+ ResourceEventProducer eventProducer =
ResourceEventProducer.Provider.get(
+ fobj.getUserAgent().getEventBroadcaster());
+ eventProducer.imageIOError(fobj, uri, ioe, fobj.getLocator());
}
- //TODO Report to caller so he can decide to throw an exception
}
return (cachedInstance != null ? cachedInstance : newInstance);
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java
Sun Jan 4 23:59:39 2009
@@ -189,12 +189,7 @@
return this.unicodeMap[idx];
}
- /**
- * Returns a character array with Unicode scalar values which can be used
to map encoding
- * code points to Unicode values. Note that this does not return all
possible Unicode values
- * that the encoding maps.
- * @return a character array with Unicode scalar values
- */
+ /** {...@inheritdoc} */
public final char[] getUnicodeCharMap() {
char[] copy = new char[this.unicodeMap.length];
System.arraycopy(this.unicodeMap, 0, copy, 0, this.unicodeMap.length);
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/EmbedFontInfo.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/EmbedFontInfo.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/EmbedFontInfo.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/EmbedFontInfo.java
Sun Jan 4 23:59:39 2009
@@ -29,7 +29,7 @@
public class EmbedFontInfo implements Serializable {
/** Serialization Version UID */
- private static final long serialVersionUID = 8755432068669997367L;
+ private static final long serialVersionUID = 8755432068669997368L;
/** filename of the metrics file */
protected String metricsFile;
@@ -37,6 +37,8 @@
protected String embedFile;
/** false, to disable kerning */
protected boolean kerning;
+ /** the requested encoding mode for the font */
+ protected EncodingMode encodingMode = EncodingMode.AUTO;
/** the PostScript name of the font */
protected String postScriptName = null;
@@ -142,6 +144,25 @@
this.embedded = value;
}
+ /**
+ * Returns the requested encoding mode for this font.
+ * @return the encoding mode
+ */
+ public EncodingMode getEncodingMode() {
+ return this.encodingMode;
+ }
+
+ /**
+ * Sets the requested encoding mode for this font.
+ * @param mode the new encoding mode
+ */
+ public void setEncodingMode(EncodingMode mode) {
+ if (mode == null) {
+ throw new NullPointerException("mode must not be null");
+ }
+ this.encodingMode = mode;
+ }
+
private void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
@@ -150,8 +171,10 @@
/** {...@inheritdoc} */
public String toString() {
- return "metrics-url=" + metricsFile + ",embed-url=" + embedFile
- + ", kerning=" + kerning + ", " + "font-triplet=" + fontTriplets
+ return "metrics-url=" + metricsFile + ", embed-url=" + embedFile
+ + ", kerning=" + kerning
+ + ", enc-mode=" + encodingMode
+ + ", font-triplet=" + fontTriplets
+ (getSubFontName() != null ? ", sub-font=" + getSubFontName() :
"")
+ (isEmbedded() ? "" : ", NOT embedded");
}
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontLoader.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontLoader.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontLoader.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/FontLoader.java
Sun Jan 4 23:59:39 2009
@@ -75,13 +75,14 @@
* @param fontFile the File representation of the font
* @param subFontName the sub-fontname of a font (for TrueType
Collections, null otherwise)
* @param embedded indicates whether the font is embedded or referenced
+ * @param encodingMode the requested encoding mode
* @param resolver the font resolver to use when resolving URIs
* @return the newly loaded font
* @throws IOException In case of an I/O error
*/
public static CustomFont loadFont(File fontFile, String subFontName,
- boolean embedded, FontResolver resolver) throws IOException {
- return loadFont(fontFile.getAbsolutePath(), subFontName, embedded,
resolver);
+ boolean embedded, EncodingMode encodingMode, FontResolver
resolver) throws IOException {
+ return loadFont(fontFile.getAbsolutePath(), subFontName, embedded,
encodingMode, resolver);
}
/**
@@ -89,13 +90,14 @@
* @param fontUrl the URL representation of the font
* @param subFontName the sub-fontname of a font (for TrueType
Collections, null otherwise)
* @param embedded indicates whether the font is embedded or referenced
+ * @param encodingMode the requested encoding mode
* @param resolver the font resolver to use when resolving URIs
* @return the newly loaded font
* @throws IOException In case of an I/O error
*/
public static CustomFont loadFont(URL fontUrl, String subFontName,
- boolean embedded, FontResolver resolver) throws IOException {
- return loadFont(fontUrl.toExternalForm(), subFontName, embedded,
resolver);
+ boolean embedded, EncodingMode encodingMode, FontResolver
resolver) throws IOException {
+ return loadFont(fontUrl.toExternalForm(), subFontName, embedded,
encodingMode, resolver);
}
/**
@@ -103,19 +105,24 @@
* @param fontFileURI the URI to the font
* @param subFontName the sub-fontname of a font (for TrueType
Collections, null otherwise)
* @param embedded indicates whether the font is embedded or referenced
+ * @param encodingMode the requested encoding mode
* @param resolver the font resolver to use when resolving URIs
* @return the newly loaded font
* @throws IOException In case of an I/O error
*/
public static CustomFont loadFont(String fontFileURI, String subFontName,
- boolean embedded, FontResolver resolver) throws IOException {
+ boolean embedded, EncodingMode encodingMode, FontResolver
resolver) throws IOException {
fontFileURI = fontFileURI.trim();
boolean type1 = isType1(fontFileURI);
FontLoader loader;
if (type1) {
+ if (encodingMode == EncodingMode.CID) {
+ throw new IllegalArgumentException(
+ "CID encoding mode not supported for Type 1 fonts");
+ }
loader = new Type1FontLoader(fontFileURI, embedded, resolver);
} else {
- loader = new TTFFontLoader(fontFileURI, subFontName, embedded,
resolver);
+ loader = new TTFFontLoader(fontFileURI, subFontName, embedded,
encodingMode, resolver);
}
return loader.getFont();
}
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/LazyFont.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/LazyFont.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/LazyFont.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/LazyFont.java
Sun Jan 4 23:59:39 2009
@@ -44,6 +44,7 @@
private String metricsFileName = null;
private String fontEmbedPath = null;
private boolean useKerning = false;
+ private EncodingMode encodingMode = EncodingMode.AUTO;
private boolean embedded = true;
private String subFontName = null;
@@ -63,6 +64,7 @@
this.metricsFileName = fontInfo.getMetricsFile();
this.fontEmbedPath = fontInfo.getEmbedFile();
this.useKerning = fontInfo.getKerning();
+ this.encodingMode = fontInfo.getEncodingMode();
this.subFontName = fontInfo.getSubFontName();
this.embedded = fontInfo.isEmbedded();
this.resolver = resolver;
@@ -130,7 +132,7 @@
throw new RuntimeException("Cannot load font. No font
URIs available.");
}
realFont = FontLoader.loadFont(fontEmbedPath,
this.subFontName,
- this.embedded, resolver);
+ this.embedded, this.encodingMode, resolver);
}
if (realFont instanceof FontDescriptor) {
realFontDescriptor = (FontDescriptor) realFont;
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java
Sun Jan 4 23:59:39 2009
@@ -25,6 +25,8 @@
import org.apache.xmlgraphics.fonts.Glyphs;
+import org.apache.fop.util.CharUtilities;
+
/**
* A simple implementation of the OneByteEncoding mostly used for encodings
that are constructed
* on-the-fly.
@@ -138,6 +140,18 @@
}
/** {...@inheritdoc} */
+ public char[] getUnicodeCharMap() {
+ char[] map = new char[getLastChar() + 1];
+ for (int i = 0; i < getFirstChar(); i++) {
+ map[i] = CharUtilities.NOT_A_CHARACTER;
+ }
+ for (int i = getFirstChar(); i <= getLastChar(); i++) {
+ map[i] = getCharacterForIndex(i).getSingleUnicodeValue();
+ }
+ return map;
+ }
+
+ /** {...@inheritdoc} */
public String toString() {
return getName() + " (" + getSize() + " chars)";
}
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteEncoding.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteEncoding.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteEncoding.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteEncoding.java
Sun Jan 4 23:59:39 2009
@@ -47,4 +47,12 @@
*/
String[] getCharNameMap();
+ /**
+ * Returns a character array with Unicode scalar values which can be used
to map encoding
+ * code points to Unicode values. Note that this does not return all
possible Unicode values
+ * that the encoding maps.
+ * @return a character array with Unicode scalar values
+ */
+ char[] getUnicodeCharMap();
+
}
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
Sun Jan 4 23:59:39 2009
@@ -33,6 +33,7 @@
import org.apache.fop.fonts.CustomFont;
import org.apache.fop.fonts.EmbedFontInfo;
+import org.apache.fop.fonts.EncodingMode;
import org.apache.fop.fonts.Font;
import org.apache.fop.fonts.FontCache;
import org.apache.fop.fonts.FontEventListener;
@@ -224,7 +225,7 @@
}
try {
TTFFontLoader ttfLoader = new TTFFontLoader(
- fontFileURI, fontName, true, resolver);
+ fontFileURI, fontName, true, EncodingMode.AUTO,
resolver);
customFont = ttfLoader.getFont();
if (this.eventListener != null) {
customFont.setEventListener(this.eventListener);
@@ -248,7 +249,7 @@
} else {
// The normal case
try {
- customFont = FontLoader.loadFont(fontUrl, null, true,
resolver);
+ customFont = FontLoader.loadFont(fontUrl, null, true,
EncodingMode.AUTO, resolver);
if (this.eventListener != null) {
customFont.setEventListener(this.eventListener);
}
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java
Sun Jan 4 23:59:39 2009
@@ -31,6 +31,7 @@
import org.apache.fop.fonts.BFEntry;
import org.apache.fop.fonts.CIDFontType;
+import org.apache.fop.fonts.EncodingMode;
import org.apache.fop.fonts.FontLoader;
import org.apache.fop.fonts.FontResolver;
import org.apache.fop.fonts.FontType;
@@ -46,6 +47,7 @@
private MultiByteFont multiFont;
private SingleByteFont singleFont;
private String subFontName;
+ private EncodingMode encodingMode;
/**
* Default constructor
@@ -53,7 +55,7 @@
* @param resolver the FontResolver for font URI resolution
*/
public TTFFontLoader(String fontFileURI, FontResolver resolver) {
- this(fontFileURI, null, true, resolver);
+ this(fontFileURI, null, true, EncodingMode.AUTO, resolver);
}
/**
@@ -62,12 +64,17 @@
* @param subFontName the sub-fontname of a font in a TrueType Collection
(or null for normal
* TrueType fonts)
* @param embedded indicates whether the font is embedded or referenced
+ * @param encodingMode the requested encoding mode
* @param resolver the FontResolver for font URI resolution
*/
public TTFFontLoader(String fontFileURI, String subFontName,
- boolean embedded, FontResolver resolver) {
+ boolean embedded, EncodingMode encodingMode, FontResolver
resolver) {
super(fontFileURI, embedded, resolver);
this.subFontName = subFontName;
+ this.encodingMode = encodingMode;
+ if (this.encodingMode == EncodingMode.AUTO) {
+ this.encodingMode = EncodingMode.CID; //Default to CID mode for
TrueType
+ }
}
/** {...@inheritdoc} */
@@ -105,6 +112,9 @@
}
boolean isCid = this.embedded;
+ if (this.encodingMode == EncodingMode.SINGLE_BYTE) {
+ isCid = false;
+ }
if (isCid) {
multiFont = new MultiByteFont();
@@ -156,7 +166,7 @@
copyKerning(ttf, isCid);
if (this.embedded && ttf.isEmbeddable()) {
- multiFont.setEmbedFileName(this.fontFileURI);
+ returnFont.setEmbedFileName(this.fontFileURI);
}
}
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/CMapBuilder.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/CMapBuilder.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/CMapBuilder.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/CMapBuilder.java
Sun Jan 4 23:59:39 2009
@@ -110,8 +110,16 @@
}
protected void writeCodeSpaceRange() throws IOException {
+ writeCodeSpaceRange(false);
+ }
+
+ protected void writeCodeSpaceRange(boolean singleByte) throws IOException {
writer.write("1 begincodespacerange\n");
- writer.write("<0000> <FFFF>\n");
+ if (singleByte) {
+ writer.write("<00> <FF>\n");
+ } else {
+ writer.write("<0000> <FFFF>\n");
+ }
writer.write("endcodespacerange\n");
}
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFactory.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFactory.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFactory.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFactory.java
Sun Jan 4 23:59:39 2009
@@ -1227,10 +1227,23 @@
return preRegisteredfont;
}
+ boolean forceToUnicode = true;
+
if (descriptor == null) {
//Usually Base 14 fonts
PDFFont font = new PDFFont(fontname, FontType.TYPE1, basefont,
encoding);
getDocument().registerObject(font);
+ if (forceToUnicode && !PDFEncoding.isPredefinedEncoding(encoding))
{
+ SingleByteEncoding mapping;
+ if (encoding != null) {
+ mapping = CodePointMapping.getMapping(encoding);
+ } else {
+ //for Symbol and ZapfDingbats where encoding must be null
in PDF
+ Typeface tf = (Typeface)metrics;
+ mapping =
CodePointMapping.getMapping(tf.getEncodingName());
+ }
+ generateToUnicodeCmap(font, mapping);
+ }
return font;
} else {
FontType fonttype = metrics.getFontType();
@@ -1266,7 +1279,7 @@
"fop-ucs-H",
new PDFCIDSystemInfo("Adobe",
"Identity",
- 0));
+ 0), false);
getDocument().registerObject(cmap);
((PDFFontType0)font).setCMAP(cmap);
((PDFFontType0)font).setDescendantFonts(cidFont);
@@ -1290,8 +1303,13 @@
SingleByteEncoding mapping = singleByteFont.getEncoding();
if (singleByteFont.isSymbolicFont()) {
//no encoding, use the font's encoding
+ if (forceToUnicode) {
+ generateToUnicodeCmap(nonBase14, mapping);
+ }
} else if
(PDFEncoding.isPredefinedEncoding(mapping.getName())) {
font.setEncoding(mapping.getName());
+ //No ToUnicode CMap necessary if PDF 1.4, chapter 5.9
(page 368) is to be
+ //believed.
} else {
Object pdfEncoding = createPDFEncoding(mapping,
singleByteFont.getFontName());
@@ -1300,16 +1318,9 @@
} else {
font.setEncoding((String)pdfEncoding);
}
-
- /* JM: What I thought would be a necessity with custom
encodings turned out to
- * be a bug in Adobe Acrobat 8. The following section just
demonstrates how
- * to generate a ToUnicode CMap for a Type 1 font.
- PDFCMap cmap = new
PDFToUnicodeCMap(mapping.getUnicodeCharMap(),
- "fop-ucs-H",
- new PDFCIDSystemInfo("Adobe", "Identity", 0));
- getDocument().registerObject(cmap);
- nonBase14.setToUnicode(cmap);
- */
+ if (forceToUnicode) {
+ generateToUnicodeCmap(nonBase14, mapping);
+ }
}
//Handle additional encodings (characters outside the primary
encoding)
@@ -1330,6 +1341,9 @@
new PDFArray(null,
singleByteFont.getAdditionalWidths(i)));
getDocument().registerObject(addFont);
getDocument().getResources().addFont(addFont);
+ if (forceToUnicode) {
+ generateToUnicodeCmap(addFont, addEncoding);
+ }
}
}
}
@@ -1338,6 +1352,14 @@
}
}
+ private void generateToUnicodeCmap(PDFFont font, SingleByteEncoding
encoding) {
+ PDFCMap cmap = new PDFToUnicodeCMap(encoding.getUnicodeCharMap(),
+ "fop-ucs-H",
+ new PDFCIDSystemInfo("Adobe", "Identity", 0), true);
+ getDocument().registerObject(cmap);
+ font.setToUnicode(cmap);
+ }
+
/**
* Creates a PDFEncoding instance from a CodePointMapping instance.
* @param encoding the code point mapping (encoding)
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFont.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFont.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFont.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFont.java
Sun Jan 4 23:59:39 2009
@@ -86,6 +86,14 @@
}
/**
+ * Sets a ToUnicode CMap.
+ * @param cmap the ToUnicode character map
+ */
+ public void setToUnicode(PDFCMap cmap) {
+ put("ToUnicode", cmap);
+ }
+
+ /**
* factory method with the basic parameters
*
* @param fontname the internal name for the font
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFontNonBase14.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFontNonBase14.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFontNonBase14.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFFontNonBase14.java
Sun Jan 4 23:59:39 2009
@@ -71,14 +71,6 @@
return (PDFFontDescriptor)get("FontDescriptor");
}
- /**
- * Sets a ToUnicode CMap.
- * @param cmap the ToUnicode character map
- */
- public void setToUnicode(PDFCMap cmap) {
- put("ToUnicode", cmap);
- }
-
/** {...@inheritdoc} */
protected void validate() {
if (getDocumentSafely().getProfile().isFontEmbeddingRequired()) {
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFToUnicodeCMap.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFToUnicodeCMap.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFToUnicodeCMap.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/pdf/PDFToUnicodeCMap.java
Sun Jan 4 23:59:39 2009
@@ -43,6 +43,8 @@
*/
protected char[] unicodeCharMap;
+ private boolean singleByte;
+
/**
* Constructor.
*
@@ -51,10 +53,17 @@
* @param name One of the registered names found in Table 5.14 in PDF
* Reference, Second Edition.
* @param sysInfo The attributes of the character collection of the
CIDFont.
+ * @param singleByte true for single-byte, false for double-byte
*/
- public PDFToUnicodeCMap(char[] unicodeCharMap, String name,
PDFCIDSystemInfo sysInfo) {
+ public PDFToUnicodeCMap(char[] unicodeCharMap, String name,
PDFCIDSystemInfo sysInfo,
+ boolean singleByte) {
super(name, sysInfo);
+ if (singleByte && unicodeCharMap.length > 256) {
+ throw new IllegalArgumentException("unicodeCharMap may not contain
more than"
+ + " 256 characters for single-byte encodings");
+ }
this.unicodeCharMap = unicodeCharMap;
+ this.singleByte = singleByte;
}
/** {...@inheritdoc} */
@@ -78,7 +87,7 @@
writeCIDSystemInfo("Adobe", "UCS", 0);
writeName("Adobe-Identity-UCS");
writeType("2");
- writeCodeSpaceRange();
+ writeCodeSpaceRange(singleByte);
writeBFEntries();
writeWrapUp();
}
@@ -122,7 +131,7 @@
while (partOfRange(charArray, charIndex)) {
charIndex++;
}
- writer.write("<" +
padHexString(Integer.toHexString(charIndex), 4) + "> ");
+ writer.write("<" + padCharIndex(charIndex) + "> ");
writer.write("<" +
padHexString(Integer.toHexString(charArray[charIndex]), 4)
+ ">\n");
charIndex++;
@@ -132,6 +141,10 @@
} while (remainingEntries > 0);
}
+ private String padCharIndex(int charIndex) {
+ return padHexString(Integer.toHexString(charIndex), (singleByte ?
2 : 4));
+ }
+
/**
* Writes the entries for character ranges for a base font.
* @param p StringBuffer to write to
@@ -159,9 +172,9 @@
while (!startOfRange(charArray, charIndex)) {
charIndex++;
}
- writer.write("<" +
padHexString(Integer.toHexString(charIndex), 4) + "> ");
+ writer.write("<" + padCharIndex(charIndex) + "> ");
writer.write("<"
- +
padHexString(Integer.toHexString(endOfRange(charArray, charIndex)), 4)
+ + padCharIndex(endOfRange(charArray, charIndex))
+ "> ");
writer.write("<" +
padHexString(Integer.toHexString(charArray[charIndex]), 4)
+ ">\n");
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/PrintRendererConfigurator.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/PrintRendererConfigurator.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/PrintRendererConfigurator.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/PrintRendererConfigurator.java
Sun Jan 4 23:59:39 2009
@@ -42,6 +42,7 @@
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.FopFactory;
import org.apache.fop.fonts.EmbedFontInfo;
+import org.apache.fop.fonts.EncodingMode;
import org.apache.fop.fonts.FontCache;
import org.apache.fop.fonts.FontEventAdapter;
import org.apache.fop.fonts.FontEventListener;
@@ -425,8 +426,11 @@
}
boolean useKerning = fontCfg.getAttributeAsBoolean("kerning", true);
+ EncodingMode encodingMode = EncodingMode.valueOf(
+ fontCfg.getAttribute("encoding-mode",
EncodingMode.AUTO.getName()));
EmbedFontInfo embedFontInfo
= new EmbedFontInfo(metricsUrl, useKerning, tripletList,
embedUrl, subFont);
+ embedFontInfo.setEncodingMode(encodingMode);
if (fontCache != null) {
if (!fontCache.containsFont(embedFontInfo)) {
fontCache.addFont(embedFontInfo);
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java:699793-728025
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java:699793-731479
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFContentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContentHandler.java:680381-728025
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContentHandler.java:680381-731479
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFPainter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFPainter.java:680381-728025
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFPainter.java:680381-731479
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFRenderer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java:680381-728025
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java:680381-731479
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java:685127-728025
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java:685127-731479
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/java2d/ConfiguredFontCollection.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/java2d/ConfiguredFontCollection.java?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/java2d/ConfiguredFontCollection.java
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/java2d/ConfiguredFontCollection.java
Sun Jan 4 23:59:39 2009
@@ -28,6 +28,7 @@
import org.apache.fop.fonts.CustomFont;
import org.apache.fop.fonts.EmbedFontInfo;
+import org.apache.fop.fonts.EncodingMode;
import org.apache.fop.fonts.FontCollection;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.fonts.FontLoader;
@@ -87,7 +88,7 @@
font = new CustomFontMetricsMapper(fontMetrics,
fontSource);
} else {
CustomFont fontMetrics = FontLoader.loadFont(
- fontFile, null, true, fontResolver);
+ fontFile, null, true, EncodingMode.AUTO,
fontResolver);
font = new CustomFontMetricsMapper(fontMetrics);
}
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java:699793-728025
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java:699793-731479
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java:699793-728025
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java:699793-731479
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java:699793-728025
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java:699793-731479
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java:699793-728025
+/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java:699793-731479
Propchange:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 4 23:59:39 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java:699793-728025
+/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java:699793-731479
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/status.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/status.xml?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/status.xml (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/status.xml Sun Jan 4
23:59:39 2009
@@ -53,6 +53,17 @@
<changes>
<release version="FOP Trunk" date="TBD">
+ <action context="Fonts" dev="JM" type="add">
+ FOP now creates ToUnicode CMaps for single-byte fonts that don't use
built-in
+ encodings to help PDF text extractors interpreting characters.
+ </action>
+ <action context="Fonts" dev="JM" type="add">
+ Added support for forcing single-byte encodings for TrueType fonts
without
+ creating an XML font metric file (see "encoding-mode" attribute on
"font" element)
+ </action>
+ <action context="Layout" dev="JM" type="fix" fixes-bug="45306">
+ Fixed fo:instream-foreign-object inside fo:marker.
+ </action>
<action context="Renderers" dev="JM" type="fix">
Fixed black backgrounds occurring for transparent images in PCL output.
</action>
Modified:
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/layoutengine/disabled-testcases.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/layoutengine/disabled-testcases.xml?rev=731480&r1=731479&r2=731480&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/layoutengine/disabled-testcases.xml
(original)
+++
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/layoutengine/disabled-testcases.xml
Sun Jan 4 23:59:39 2009
@@ -223,9 +223,4 @@
relaxed validation must be switched on, otherwise there is a validation
exception.</description>
</testcase>
- <testcase>
- <name>Instream foreign objects in markers</name>
- <file>marker_instream-foreign-object.xml</file>
- <description>Foreign objects in markers do not work.</description>
- </testcase>
</disabled-testcases>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]