[cairo-commit] src/cairo.c src/cairo-gstate.c
Chris Wilson
ickle at kemper.freedesktop.org
Sun Aug 14 07:30:17 PDT 2011
src/cairo-gstate.c | 2 ++
src/cairo.c | 18 +++++++++++-------
2 files changed, 13 insertions(+), 7 deletions(-)
New commits:
commit f6fc6f1ad0315d51b6b395749f8035fb7dcccbbc
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Aug 14 15:29:08 2011 +0100
gstate: Copy clusters for an untransformed unbounded surface
Fixes record-select-font-face
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 1d59fc5..1b0658d 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -2099,6 +2099,8 @@ _cairo_gstate_transform_glyphs_to_backend (cairo_gstate_t *gstate,
if (! drop) {
memcpy (transformed_glyphs, glyphs,
num_glyphs * sizeof (cairo_glyph_t));
+ memcpy (transformed_clusters, clusters,
+ num_clusters * sizeof (cairo_text_cluster_t));
j = num_glyphs;
} else if (num_clusters == 0) {
for (i = 0; i < num_glyphs; i++) {
diff --git a/src/cairo.c b/src/cairo.c
index e58206b..a9f8c6e 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -3057,7 +3057,7 @@ cairo_show_text (cairo_t *cr, const char *utf8)
cairo_glyph_t stack_glyphs[CAIRO_STACK_ARRAY_LENGTH (cairo_glyph_t)];
cairo_text_cluster_t stack_clusters[CAIRO_STACK_ARRAY_LENGTH (cairo_text_cluster_t)];
cairo_scaled_font_t *scaled_font;
- cairo_glyph_text_info_t info;
+ cairo_glyph_text_info_t info, *i;
if (unlikely (cr->status))
return;
@@ -3100,13 +3100,17 @@ cairo_show_text (cairo_t *cr, const char *utf8)
if (num_glyphs == 0)
return;
- info.utf8 = utf8;
- info.utf8_len = utf8_len;
- info.clusters = clusters;
- info.num_clusters = num_clusters;
- info.cluster_flags = cluster_flags;
+ i = NULL;
+ if (has_show_text_glyphs) {
+ info.utf8 = utf8;
+ info.utf8_len = utf8_len;
+ info.clusters = clusters;
+ info.num_clusters = num_clusters;
+ info.cluster_flags = cluster_flags;
+ i = &info;
+ }
- status = cr->backend->glyphs (cr, glyphs, num_glyphs, &info);
+ status = cr->backend->glyphs (cr, glyphs, num_glyphs, i);
if (unlikely (status))
goto BAIL;
More information about the cairo-commit
mailing list