mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-03-06 17:30:38 +01:00
[win32] Fix horizontal glyph positioning bug
The _cairo_win32_scaled_font_backend version of show_glyphs collects glyph runs to hand to ExtTextOutW until the y-offset changes, then flushes the glyphs buffered so far. As each glyph is buffered, it also calculates and buffers the dx value for the preceding glyph. However, when it sees a change in dy and decides to flush, it should *not* append an entry to the dx buffer, as this would be the "dx" of the previous glyph, and instead the new start_x value will be used for the new glyph run that's being collected. This bug means that after any vertically-offset glyph, the remaining glyphs in the run will get incorrect dx values (horizontal escapement). Mozilla bug #475092
This commit is contained in:
parent
aee71e2063
commit
77ee65fd03
1 changed files with 5 additions and 5 deletions
|
|
@ -1180,12 +1180,12 @@ _add_glyph (cairo_glyph_state_t *state,
|
|||
if (status)
|
||||
return status;
|
||||
state->start_x = logical_x;
|
||||
} else {
|
||||
dx = logical_x - state->last_x;
|
||||
status = _cairo_array_append (&state->dx, &dx);
|
||||
if (status)
|
||||
return status;
|
||||
}
|
||||
|
||||
dx = logical_x - state->last_x;
|
||||
status = _cairo_array_append (&state->dx, &dx);
|
||||
if (status)
|
||||
return status;
|
||||
} else {
|
||||
state->start_x = logical_x;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue