fenfire-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ff-cvs] libvob/test/vob vobs/textvob.test textstyle.test


From: Asko Soukka
Subject: [ff-cvs] libvob/test/vob vobs/textvob.test textstyle.test
Date: Sun, 17 Aug 2003 17:00:15 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Asko Soukka <address@hidden>    03/08/17 17:00:15

Modified files:
        test/vob/vobs  : textvob.test 
Added files:
        test/vob       : textstyle.test 

Log message:
        BUG: the width of a space is calculated wrong in GL (AWT works)

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/vob/textstyle.test?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/vob/vobs/textvob.test.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: libvob/test/vob/vobs/textvob.test
diff -u libvob/test/vob/vobs/textvob.test:1.3 
libvob/test/vob/vobs/textvob.test:1.4
--- libvob/test/vob/vobs/textvob.test:1.3       Tue Apr  8 11:26:10 2003
+++ libvob/test/vob/vobs/textvob.test   Sun Aug 17 17:00:15 2003
@@ -1,3 +1,4 @@
+# -*-python-*-
 # 
 # Copyright (c) 2003, Asko Soukka
 # 
@@ -21,47 +22,14 @@
 # 
 
 
-"""Test text sizes, rendering etc.
+"""
+Test text sizes, rendering etc.
 """
 
 from test.tools.gfx import *
 from java.awt import Color
 
 sty1 = win.getGraphicsAPI().getTextStyle("SansSerif", 0, 20)
-sty2 = win.getGraphicsAPI().getTextStyle("SansSerif", 0, 50)
-sty3 = win.getGraphicsAPI().getTextStyle("SansSerif", 0, 10)
-
-def testStyleSize():
-    """Test that the different styles give out suitable heights.
-    """
-    failUnlessApprox(4, sty1.getHeight(1), 20)
-    failUnlessApprox(15, sty2.getHeight(1), 50)
-    failUnlessApprox(4, sty3.getHeight(1), 10)
-
-    failUnlessApprox(10, sty1.getHeight(2), 40)
-    failUnlessApprox(25, sty2.getHeight(2), 100)
-    failUnlessApprox(8, sty3.getHeight(2), 20)
-
-    failUnlessApprox(20, sty2.getWidth("xx", 1), 50)
-    failUnlessApprox(4, sty3.getWidth("xx", 1), 10)
-
-def testStyleScaling():
-    """Test scaling by height.
-    """
-    for height in range (0, 100):
-       scale = sty1.getScaleByHeight(height)
-       failUnlessApprox(1, sty1.getHeight(scale), height, "height")
-       failUnlessApprox(1, sty1.getAscent(scale) + sty1.getDescent(scale), 
height, "ascender + descender")
-       
-def testSize():
-    """Test, for various box sizes, that text consisting of 
-    lower-case letter x is on the baseline or slightly above.
-    """
-
-def testScale():
-    """Test that hierarchical coordinate systems affect the scaling
-    in the same way.
-    """
 
 def testWH():
     """Test that TextVob is drawn with the width and height




reply via email to

[Prev in Thread] Current Thread [Next in Thread]