keiron 01/07/09 01:14:48
Modified: src/org/apache/fop/svg PDFDocumentGraphics2D.java
Log:
sets up the font state if not using strokes for text
Revision Changes Path
1.6 +15 -3 xml-fop/src/org/apache/fop/svg/PDFDocumentGraphics2D.java
Index: PDFDocumentGraphics2D.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFDocumentGraphics2D.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PDFDocumentGraphics2D.java 2001/06/18 08:19:19 1.5
+++ PDFDocumentGraphics2D.java 2001/07/09 08:14:44 1.6
@@ -1,13 +1,16 @@
-/* $Id: PDFDocumentGraphics2D.java,v 1.5 2001/06/18 08:19:19 keiron Exp $
+/* $Id: PDFDocumentGraphics2D.java,v 1.6 2001/07/09 08:14:44 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
- * LICENSE file included with these sources."
+ * LICENSE file included with these sources.
*/
package org.apache.fop.svg;
import org.apache.fop.pdf.*;
import org.apache.fop.fonts.*;
+import org.apache.fop.render.pdf.FontSetup;
+import org.apache.fop.layout.*;
+import org.apache.fop.apps.FOPException;
import java.awt.Graphics;
import java.awt.Font;
@@ -24,7 +27,7 @@
* <tt>PDFGraphics2D</tt>.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Keiron Liddle</a>
- * @version $Id: PDFDocumentGraphics2D.java,v 1.5 2001/06/18 08:19:19 keiron Exp $
+ * @version $Id: PDFDocumentGraphics2D.java,v 1.6 2001/07/09 08:14:44 keiron Exp $
* @see org.apache.fop.svg.PDFGraphics2D
*/
public class PDFDocumentGraphics2D extends PDFGraphics2D {
@@ -49,6 +52,15 @@
public PDFDocumentGraphics2D(boolean textAsShapes,
OutputStream stream, int width, int height) {
super(textAsShapes);
+
+ if(!textAsShapes) {
+ FontInfo fontInfo = new FontInfo();
+ FontSetup.setup(fontInfo);
+ try {
+ fontState = new FontState(fontInfo, "Helvetica", "normal",
"normal", 12, 0);
+ } catch(FOPException e) {
+ }
+ }
standalone = true;
this.stream = stream;
this.pdfDoc = new PDFDocument();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]