[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/test/gzz vob/textvob.test locale.test
From: |
Asko Soukka |
Subject: |
[Gzz-commits] gzz/test/gzz vob/textvob.test locale.test |
Date: |
Wed, 04 Dec 2002 05:28:04 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Asko Soukka <address@hidden> 02/12/04 05:28:04
Modified files:
test/gzz/vob : textvob.test
Added files:
test/gzz : locale.test
Log message:
Trying to catch Tuomas' locale bug with textvob.test.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/locale.test?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/vob/textvob.test.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
Patches:
Index: gzz/test/gzz/vob/textvob.test
diff -u gzz/test/gzz/vob/textvob.test:1.13 gzz/test/gzz/vob/textvob.test:1.14
--- gzz/test/gzz/vob/textvob.test:1.13 Fri Nov 22 09:44:19 2002
+++ gzz/test/gzz/vob/textvob.test Wed Dec 4 05:28:04 2002
@@ -42,18 +42,37 @@
in the same way.
"""
+def testUnicode():
+ """Test that some unicode chars are drawn correctly."""
+ text_scale = 1.5
+ vs = getvs()
+ size = vs.getSize()
+ vs.map.put(gzz.vob.vobs.SolidBgVob(Color.red))
+ textvob = gzz.vob.vobs.TextVob(sty1, "ÅÄÖÅÄÖ")
+
+ text_width = int(textvob.getWidth(text_scale))
+ text_height = int(textvob.getHeight(text_scale))
+ text_depth = int(textvob.getDepth(text_scale))
+
+ cs = vs.orthoBoxCS(0, "window", 0, 100, 100, 1, 1, size.width,
size.height)
+ cs_text = vs.orthoCS(cs, "text", 0, 0, 0, text_height + text_depth,
text_height + text_depth)
+ vs.map.put(textvob, cs_text)
+ render(vs)
+
+ """The top edge."""
+ checkNotAvgColor(100, 100, text_width, 10, (255, 0, 0), delta=1)
+
def testWH():
"""Tests that TextVob is drawn with the width and height
that it claims with getWidth() and getHeight().
"""
-
text_scale = 0
for scale in range(1, 3):
text_scale += scale
vs = getvs()
size = vs.getSize()
vs.map.put(gzz.vob.vobs.SolidBgVob(Color.red))
- textvob = gzz.vob.vobs.TextVob(sty1, "XÄjÖgqÅypX")
+ textvob = gzz.vob.vobs.TextVob(sty1, "XjXjXjX")
text_width = int(textvob.getWidth(text_scale))
text_height = int(textvob.getHeight(text_scale))
@@ -64,8 +83,9 @@
vs.map.put(textvob, cs_text)
render(vs)
- """The top edge."""
- checkNotAvgColor(100, 100, text_width, 10, (255, 0, 0), delta=1)
+# We can't test the top edge, because we don't know the height of 'X'
letter.
+# """The top edge."""
+# checkNotAvgColor(100, 100, text_width, 10, (255, 0, 0), delta=1)
"""The left edge."""
checkNotAvgColor(100, 100, 10, text_height+text_depth, (255, 0, 0),
delta=1)
- [Gzz-commits] gzz/test/gzz vob/textvob.test locale.test,
Asko Soukka <=