mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-18 08:30:47 +02:00
[user-font] Set correct device-offset for rotated text
Part of patch from Peter Clifton
This commit is contained in:
parent
16fe67ea19
commit
df9deb1853
1 changed files with 3 additions and 2 deletions
|
|
@ -170,13 +170,14 @@ _cairo_user_scaled_glyph_init (void *abstract_font,
|
|||
_cairo_fixed_integer_floor (scaled_glyph->bbox.p1.x);
|
||||
height = _cairo_fixed_integer_ceil (scaled_glyph->bbox.p2.y) -
|
||||
_cairo_fixed_integer_floor (scaled_glyph->bbox.p1.y);
|
||||
|
||||
/* XXX handle / figure out antialias/subpixel font options to choose
|
||||
* the right format here? */
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_A8, width, height);
|
||||
|
||||
cairo_surface_set_device_offset (surface,
|
||||
_cairo_lround (-scaled_glyph->metrics.x_bearing),
|
||||
_cairo_lround (-scaled_glyph->metrics.y_bearing));
|
||||
- _cairo_fixed_integer_floor (scaled_glyph->bbox.p1.x),
|
||||
- _cairo_fixed_integer_floor (scaled_glyph->bbox.p1.y));
|
||||
status = _cairo_meta_surface_replay (meta_surface, surface);
|
||||
|
||||
if (status) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue