Skip to content

(#799): Don't leave active points in the current Cairo path after drawing text

Pangocairo's show_layout family of functions use the cr's current point as the starting point for the text. Librsvg does a lone cr.move_to() to establish this point.

However, Pangocairo does not consume that point; it tries to leave the current path alone. Also, the current path (and current point) are not part of cairo's gstate - if on does cairo_save(), then sets the path, then cairo_restore(), the latter function call will not remove the current path. So, having a element as the last renderable element in an SVG would cause librsvg to leave a lone point as part of the cr that the caller passed in.

This commit resets the current subpath after text operations to avoid that.

Fixes #799 (closed)

Closes #799 (closed)

Merge request reports