You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by vh...@apache.org on 2001/04/27 20:34:18 UTC

cvs commit: xml-batik/sources/org/apache/batik/svggen SVGRenderingHints.java

vhardy      01/04/27 11:34:18

  Modified:    .        build.xml
               sources/org/apache/batik/apps/ttf2svg Main.java
               sources/org/apache/batik/svggen SVGRenderingHints.java
  Log:
  a. Added ttf2svg rule in build.xml and corresponding app in ....batik.apps.
  b. Modified rendering hints convertion to be consistent with SVG hints
     interpretation.
  
  Revision  Changes    Path
  1.58      +17 -1     xml-batik/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-batik/build.xml,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- build.xml	2001/04/20 07:23:10	1.57
  +++ build.xml	2001/04/27 18:34:06	1.58
  @@ -45,7 +45,7 @@
     [win32] .\build.bat help
   
    
  - $Id: build.xml,v 1.57 2001/04/20 07:23:10 vhardy Exp $
  + $Id: build.xml,v 1.58 2001/04/27 18:34:06 vhardy Exp $
   
   -->
   
  @@ -127,6 +127,7 @@
       <echo message="   svgbrowser    --> runs the SVG browser"/>
       <echo message="   svgrasterizer --> runs the SVG rasterizer"/>
       <echo message="   svgpp         --> runs the SVG pretty-printer"/>
  +    <echo message="   ttf2svg       --> converts selected glyphs from a True Type Font file to the SVG Font format"/>
       <echo message="   regard        --> runs the regard regression utility"/>
       <echo message="   runtestsuite  --> runs a TestSuite, given an XML test suite document" />
       <echo message="   javadoc       --> generates the API documentation"/>
  @@ -587,6 +588,21 @@
       <mkdir dir="${test-references}/svgbe/accepted-variation"/>
       <mkdir dir="${test-references}/svgbe/candidate-variation"/>
       <mkdir dir="${test-references}/org/apache/batik/svggen/candidate-ref" />
  +  </target>
  +
  +  <target name="ttf2svg"
  +          depends="compile, testdirs"
  +          description="converts selected glyphs from a True Type Font file to the SVG Font format" >
  +    <java fork="yes"
  +          classname="${class-prefix}.apps.ttf2svg.Main"
  +          jvmargs="-DproxyHost=webcache.eng.sun.com -DproxyPort=8080">
  +      <classpath>
  +        <pathelement location="${dest}" />
  +        <path refid="libs-classpath"/>
  +        <pathelement location="resources" />
  +      </classpath>
  +      <arg line="${args}"/>
  +    </java>
     </target>
   
     <target name="regard"
  
  
  
  1.2       +6 -1      xml-batik/sources/org/apache/batik/apps/ttf2svg/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/apps/ttf2svg/Main.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Main.java	2001/04/27 18:22:35	1.1
  +++ Main.java	2001/04/27 18:34:09	1.2
  @@ -8,14 +8,19 @@
   
   package org.apache.batik.apps.ttf2svg;
   
  +import org.apache.batik.svggen.font.SVGFont;
  +
   /**
    * This test runs the True Type Font to SVG Font converter, the 
    * tool that allows some characters from a font to be converted
    * to the SVG Font format.
    *
    * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
  - * @version $Id: Main.java,v 1.1 2001/04/27 18:22:35 vhardy Exp $
  + * @version $Id: Main.java,v 1.2 2001/04/27 18:34:09 vhardy Exp $
    */
   public class Main {
  +    public static void main(String[] args){
  +        SVGFont.main(args);
  +    }
   }
   
  
  
  
  1.9       +5 -5      xml-batik/sources/org/apache/batik/svggen/SVGRenderingHints.java
  
  Index: SVGRenderingHints.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/svggen/SVGRenderingHints.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SVGRenderingHints.java	2001/04/26 14:17:29	1.8
  +++ SVGRenderingHints.java	2001/04/27 18:34:14	1.9
  @@ -32,7 +32,7 @@
    * + TEXT_ANTIALIASING -> text-rendering
    *
    * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  - * @version $Id: SVGRenderingHints.java,v 1.8 2001/04/26 14:17:29 cjolif Exp $
  + * @version $Id: SVGRenderingHints.java,v 1.9 2001/04/27 18:34:14 vhardy Exp $
    */
   public class SVGRenderingHints extends AbstractSVGConverter{
       /**
  @@ -110,11 +110,11 @@
               //
               Object antialiasing = hints.get(hints.KEY_ANTIALIASING);
               if(antialiasing == hints.VALUE_ANTIALIAS_ON){
  -                textRendering = SVG_GEOMETRIC_PRECISION_VALUE;
  +                textRendering = SVG_OPTIMIZE_LEGIBILITY_VALUE;
                   shapeRendering = SVG_GEOMETRIC_PRECISION_VALUE;
               }
               else if(antialiasing == hints.VALUE_ANTIALIAS_OFF){
  -                textRendering = SVG_OPTIMIZE_LEGIBILITY_VALUE;
  +                textRendering = SVG_GEOMETRIC_PRECISION_VALUE;
                   shapeRendering = SVG_CRISP_EDGES_VALUE;
               }
               else if(antialiasing == hints.VALUE_ANTIALIAS_DEFAULT){
  @@ -127,9 +127,9 @@
               //
               Object textAntialiasing = hints.get(hints.KEY_TEXT_ANTIALIASING);
               if(textAntialiasing == hints.VALUE_TEXT_ANTIALIAS_ON)
  -                textRendering = SVG_GEOMETRIC_PRECISION_VALUE;
  -            else if(textAntialiasing == hints.VALUE_TEXT_ANTIALIAS_OFF)
                   textRendering = SVG_OPTIMIZE_LEGIBILITY_VALUE;
  +            else if(textAntialiasing == hints.VALUE_TEXT_ANTIALIAS_OFF)
  +                textRendering = SVG_GEOMETRIC_PRECISION_VALUE;
               else if(textAntialiasing == hints.VALUE_TEXT_ANTIALIAS_DEFAULT)
                   textRendering = SVG_AUTO_VALUE;
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org