summaryrefslogtreecommitdiff
path: root/test/bitmap-font.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-08-17 13:54:06 -0700
committerCarl Worth <cworth@cworth.org>2006-08-17 17:50:40 -0700
commite8e7ccf602fdaa2f2e98743f96589f5b7b3faf17 (patch)
tree6e0fd57e81804febcf42b8cd74f58d9b3486a467 /test/bitmap-font.c
parent751ff78ff2acba36614bae17744427c385413264 (diff)
downloadcairo-e8e7ccf602fdaa2f2e98743f96589f5b7b3faf17.tar.gz
Add rotation to bitmap-font to demonstrate failure of bug #7888
Diffstat (limited to 'test/bitmap-font.c')
-rw-r--r--test/bitmap-font.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/bitmap-font.c b/test/bitmap-font.c
index 16ad52ca5..594e8135f 100644
--- a/test/bitmap-font.c
+++ b/test/bitmap-font.c
@@ -40,7 +40,7 @@ static cairo_test_draw_function_t draw;
cairo_test_t test = {
"bitmap-font",
"Test drawing with a font consisting only of bitmaps",
- 246 + 1, TEXT_SIZE,
+ 246 + 1, 2 * TEXT_SIZE,
draw
};
@@ -99,6 +99,15 @@ draw (cairo_t *cr, int width, int height)
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0); /* blue */
cairo_show_text (cr, "the quick brown fox jumps over a lazy dog");
+ /* And test it rotated as well. */
+
+ /* XXX: The math for the vertical positioning here is all wrong,
+ * but it is landing where I want it. Someone who understands
+ * fonts at all should fix this. */
+ cairo_move_to (cr, width -1, 2 * (TEXT_SIZE - 5));
+ cairo_rotate (cr, M_PI);
+ cairo_show_text (cr, "the quick brown fox jumps over a lazy dog");
+
return CAIRO_TEST_SUCCESS;
}