You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2009/05/15 03:37:19 UTC

svn commit: r774981 - in /xmlgraphics/batik/trunk: CHANGES build.xml sources/org/apache/batik/svggen/SVGFont.java

Author: cam
Date: Fri May 15 01:37:18 2009
New Revision: 774981

URL: http://svn.apache.org/viewvc?rev=774981&view=rev
Log:
1. Javadoc build fix.
2. Allow SVGGenerator2D to embed fonts that weren't obtained from the
   standard AWT font lookup mechanism.  (Thanks to Alexis Andre for
   finding what prevented this; see bug 46374.)

Modified:
    xmlgraphics/batik/trunk/CHANGES
    xmlgraphics/batik/trunk/build.xml
    xmlgraphics/batik/trunk/sources/org/apache/batik/svggen/SVGFont.java

Modified: xmlgraphics/batik/trunk/CHANGES
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/CHANGES?rev=774981&r1=774980&r2=774981&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/CHANGES (original)
+++ xmlgraphics/batik/trunk/CHANGES Fri May 15 01:37:18 2009
@@ -29,6 +29,8 @@
   * The location bar in Squiggle is now updated if the requested document
     followed an HTTP redirect.
   * Improve Batik's Rhino class shutter so that it works with Rhino 1.6R7.
+  * Allow SVGGenerator2D to embed fonts that weren't obtained from the
+    standard AWT font lookup mechanism.
 
 4. Bug fixes
 

Modified: xmlgraphics/batik/trunk/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/build.xml?rev=774981&r1=774980&r2=774981&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/build.xml (original)
+++ xmlgraphics/batik/trunk/build.xml Fri May 15 01:37:18 2009
@@ -82,7 +82,7 @@
     </tstamp>
     <property name="Project"            value="Apache Batik"/>
     <property name="project"            value="batik"/>
-    <property name="year"               value="2008"/>
+    <property name="year"               value="2009"/>
     <property name="version"            value="1.8"/>
     <property name="revisionType"       value="pre"/>
     <property name="revisionNumber"     value=""/>
@@ -2082,13 +2082,14 @@
              maxmemory="128m"
              destdir="${docs}/javadoc"
              encoding="UTF-8"
+             docencoding="UTF-8"
              author="false"
              version="false"
              use="true"
              splitindex="true"
              windowtitle="${Project} Javadoc"
              doctitle="${Project} API Specification ${completeVersion}"
-             bottom="Copyright &#169; ${year} Apache Software Foundation. All Rights Reserved.">
+             bottom="Copyright &#169; ${year} &lt;a href='http://www.apache.org/'&gt;Apache Software Foundation&lt;/a&gt;. All Rights Reserved.">
       <arg value="-notimestamp"/>
       <sourcepath path="${src}"/>
       <classpath refid="libs-classpath"/>

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/svggen/SVGFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/svggen/SVGFont.java?rev=774981&r1=774980&r2=774981&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/svggen/SVGFont.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/svggen/SVGFont.java Fri May 15 01:37:18 2009
@@ -200,11 +200,11 @@
      * only its size attribute modified.
      */
     private static Font createCommonSizeFont(Font font) {
-        Map attributes = new HashMap(font.getAttributes());
+        Map attributes = new HashMap();
         attributes.put(TextAttribute.SIZE, new Float(COMMON_FONT_SIZE));
         // Remove Transform from font otherwise it will be applied twice.
-        attributes.remove(TextAttribute.TRANSFORM);
-        return new Font(attributes);
+        attributes.put(TextAttribute.TRANSFORM, null);
+        return font.deriveFont(attributes);
     }
 
     /**