summaryrefslogtreecommitdiff
path: root/test/bitmap-font.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-08-17 17:45:14 -0700
committerCarl Worth <cworth@cworth.org>2006-08-17 17:50:41 -0700
commite4e5002c48ec9cea37b4347689f193b54439383e (patch)
treeaf4eaa58a21f95deb0363762aa7acbc4efc21bfb /test/bitmap-font.c
parent0bfa6d4f33b8ddb5dc55bbe419c15df4af856ff9 (diff)
downloadcairo-e4e5002c48ec9cea37b4347689f193b54439383e.tar.gz
bitmap-font: Add cairo_text_path;fill to demonstrate bug #7889
Diffstat (limited to 'test/bitmap-font.c')
-rw-r--r--test/bitmap-font.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/bitmap-font.c b/test/bitmap-font.c
index 594e8135f..ef9bbb6be 100644
--- a/test/bitmap-font.c
+++ b/test/bitmap-font.c
@@ -97,16 +97,23 @@ draw (cairo_t *cr, int width, int height)
cairo_move_to (cr, 1, TEXT_SIZE - 3);
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");
+ cairo_show_text (cr, "the quick brown fox");
- /* And test it rotated as well. */
+ /* Switch from show_text to text_path/fill to exercise bug #7889 */
+ cairo_text_path (cr, " jumps over a lazy dog");
+ cairo_fill (cr);
+
+ /* And test it rotated as well for the sake of bug #7888 */
/* 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");
+ cairo_show_text (cr, "the quick brown fox");
+
+ cairo_text_path (cr, " jumps over a lazy dog");
+ cairo_fill (cr);
return CAIRO_TEST_SUCCESS;
}