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/05/17 03:45:59 UTC
cvs commit: xml-batik/sources/org/apache/batik/gvt/font AWTGVTFont.java GVTFont.java SVGGVTGlyphVector.java
vhardy 01/05/16 18:45:59
Modified: sources/org/apache/batik/gvt/font AWTGVTFont.java
GVTFont.java SVGGVTGlyphVector.java
Log:
Removed GVT->Bridge dependancies. Problem fixed by Bella Robinson.
Revision Changes Path
1.4 +8 -1 xml-batik/sources/org/apache/batik/gvt/font/AWTGVTFont.java
Index: AWTGVTFont.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/font/AWTGVTFont.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AWTGVTFont.java 2001/05/14 16:45:40 1.3
+++ AWTGVTFont.java 2001/05/17 01:45:57 1.4
@@ -21,7 +21,7 @@
* This is a wrapper class for a java.awt.Font instance.
*
* @author <a href="mailto:bella.robinson@cmis.csiro.au">Bella Robinson</a>
- * @version $Id: AWTGVTFont.java,v 1.3 2001/05/14 16:45:40 tkormann Exp $
+ * @version $Id: AWTGVTFont.java,v 1.4 2001/05/17 01:45:57 vhardy Exp $
*/
public final class AWTGVTFont implements GVTFont {
@@ -161,6 +161,13 @@
*/
public float getSize() {
return awtFont.getSize();
+ }
+
+ /**
+ * Returns the kerning value of this character pair.
+ */
+ public float getKerning(String unicode1, String unicode2) {
+ return 0f;
}
public String toString() {
1.4 +6 -1 xml-batik/sources/org/apache/batik/gvt/font/GVTFont.java
Index: GVTFont.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/font/GVTFont.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- GVTFont.java 2001/05/14 16:45:51 1.3
+++ GVTFont.java 2001/05/17 01:45:57 1.4
@@ -16,7 +16,7 @@
* An interface for all GVT font classes.
*
* @author <a href="mailto:bella.robinson@cmis.csiro.au">Bella Robinson</a>
- * @version $Id: GVTFont.java,v 1.3 2001/05/14 16:45:51 tkormann Exp $
+ * @version $Id: GVTFont.java,v 1.4 2001/05/17 01:45:57 vhardy Exp $
*/
public interface GVTFont {
@@ -98,6 +98,11 @@
* Returns the size of this font.
*/
public float getSize();
+
+ /**
+ * Returns the kerning value of this character pair.
+ */
+ public float getKerning(String unicode1, String unicode2);
public String toString();
}
1.4 +4 -5 xml-batik/sources/org/apache/batik/gvt/font/SVGGVTGlyphVector.java
Index: SVGGVTGlyphVector.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/font/SVGGVTGlyphVector.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SVGGVTGlyphVector.java 2001/05/14 16:46:02 1.3
+++ SVGGVTGlyphVector.java 2001/05/17 01:45:57 1.4
@@ -23,7 +23,6 @@
import java.awt.Paint;
import java.awt.Stroke;
import org.apache.batik.gvt.GraphicsNodeRenderContext;
-import org.apache.batik.bridge.SVGGVTFont;
import org.apache.batik.gvt.text.GVTAttributedCharacterIterator;
import java.text.AttributedCharacterIterator;
import java.awt.font.TextAttribute;
@@ -32,7 +31,7 @@
* A GVTGlyphVector class for SVG fonts.
*
* @author <a href="mailto:bella.robinson@cmis.csiro.au">Bella Robinson</a>
- * @version $Id: SVGGVTGlyphVector.java,v 1.3 2001/05/14 16:46:02 tkormann Exp $
+ * @version $Id: SVGGVTGlyphVector.java,v 1.4 2001/05/17 01:45:57 vhardy Exp $
*/
public final class SVGGVTGlyphVector implements GVTGlyphVector {
@@ -202,9 +201,9 @@
if (glyphIndex < glyphs.length - 1) {
// check for kerning
- if (font != null && font instanceof SVGGVTFont) {
- float kern = ((SVGGVTFont)font).getKerning(glyphs[glyphIndex].getUnicode(),
- glyphs[glyphIndex+1].getUnicode());
+ if (font != null) {
+ float kern = font.getKerning(glyphs[glyphIndex].getUnicode(),
+ glyphs[glyphIndex+1].getUnicode());
return glyphs[glyphIndex].getGlyphMetrics(kern);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org