{
/* First some defaults */
args->family = "Vera";
- args->size = 20;
+ args->size = 40;
args->color.red = 0.0;
- args->color.green = 0.0;
+ args->color.green = 0.3;
args->color.blue = 0.0;
/* XXX: Next, we should override the defaults based on
double x = 0.0;
double y = 0.0;
- cairo_translate (cr, 0, -(character_height / 2.50));
-
char string[2];
string[1] = '\0';
+
+ cairo_set_line_width (cr, 2.0);
for (i = 0; i < num_characters; i++)
{
- if (i % 10 == 0)
- {
- x = 0.;
- y += character_height + 8;
- }
+ cairo_rectangle (cr, x, y, character_width, character_height);
+ cairo_stroke_preserve (cr);
+ cairo_save (cr);
+ cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */
+ cairo_fill (cr);
+ cairo_restore (cr);
+
string[0] = characters[i];
cairo_text_extents (cr, string, &extents);
- x -= extents.x_bearing;
-
- cairo_move_to (cr, x, y);
- cairo_text_path (cr, string);
- cairo_fill (cr);
+ cairo_move_to (cr, x - extents.x_bearing, y - extents.y_bearing);
+ cairo_show_text (cr, string);
- x += extents.x_bearing;
- x += character_width + 8;
+ if ((i+1) % 10 == 0)
+ {
+ x = 0.;
+ y += character_height;
+ } else {
+ x += character_width;
+ }
}
cairo_scale (cr, 1, -1);
/* Draw */
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
- (max_width + 8) * 10,
- (max_height + 8) * 10);
+ max_width * 10,
+ max_height * 10);
cr = cairo_create (surface);