cairo_text_extents_t extents;
string[0] = characters[i];
cairo_text_extents (cr, string, &extents);
-// if ((extents.height - extents.y_bearing) > max_height)
-// max_height = extents.height - extents.y_bearing;
if ((extents.height) > max_height)
max_height = extents.height;
}
cr = cairo_create (surface);
-/*
- cairo_select_font_face (cr, fontname,
- CAIRO_FONT_SLANT_NORMAL,
- CAIRO_FONT_WEIGHT_NORMAL);
-*/
cr_face = cairo_ft_font_face_create_for_ft_face (ft_face, 0);
cairo_set_font_face (cr, cr_face);
cairo_font_face_t *cr_face;
int i;
-/*
- cairo_select_font_face (cr, fontname,
- CAIRO_FONT_SLANT_NORMAL,
- CAIRO_FONT_WEIGHT_NORMAL);
-*/
cr_face = cairo_ft_font_face_create_for_ft_face (ft_face, 0);
cairo_set_font_face (cr, cr_face);
cairo_translate (cr, 0, -(character_height / 2.50));
-// cairo_translate (cr, 0, -5.0);
-
char string[2];
string[1] = '\0';
for (i = 0; i < num_characters; i++)
x += character_width + 8;
}
-/*
- int thick_width = 4;
- int thin_width = 0;
-
- for (c = 'A'; c <= 'I'; c++)
- {
- string[0] = c;
- int spacing = ((c - 'A') * letterspacing) + 1;
-
-
- cairo_save(cr);
-
- cairo_move_to (cr, spacing, 0);
- cairo_text_path (cr, string);
-// cairo_set_source_rgb (cr, 0.1, 0.2, 0.2); // gray
-cairo_set_source_rgb (cr, 0.8, 0.8, 0.85); // silver
-cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
-
-cairo_push_group (cr);
-cairo_set_line_width (cr, thick_width);
-cairo_stroke_preserve (cr);
-cairo_set_line_width (cr, thin_width);
-cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
-cairo_stroke_preserve (cr);
-cairo_fill (cr);
-cairo_pop_group_to_source (cr);
-
-cairo_paint (cr);
-
-cairo_restore(cr);
-
-cairo_move_to (cr, spacing, 0);
-cairo_text_path (cr, string);
-cairo_set_source_rgb (cr, 0.4, 0.45, 0.7); // blue
-
-cairo_fill (cr);
-}
-*/
-
cairo_scale (cr, 1, -1);
cairo_push_group (cr);
-/*
-
-cairo_pattern_t *gradient;
-
-for (i = 0; i < 9; i++)
-{
-char c[2];
-strncpy(c, STRING + i, 1);
-c[1] = '\0';
-int spacing = (i * letterspacing) + 1;
-cairo_move_to (cr, spacing, -3);
-cairo_show_text (cr, c);
-
-}
-cairo_pop_group_to_source (cr);
-
-gradient = cairo_pattern_create_linear (0, 0, 0, -fontsize);
-cairo_pattern_add_color_stop_rgba (gradient, 0.0, 1, 1, 1, 0.5);
-cairo_pattern_add_color_stop_rgba (gradient, 0.7, 1, 1, 1, 0.0);
-
-cairo_mask (cr, gradient);
-
-cairo_pattern_destroy (gradient);
-*/
}
int