diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-27 21:23:42 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-27 21:23:42 +0000 |
commit | 3c6176158e76399e4e5520efa744b9a88d3d9b64 (patch) | |
tree | 1e6a45587225e1c38369c09ac480b6b89b01080b /pango | |
parent | d0ff45ecf45b4f81d5d05e545a36a885b6a33b7a (diff) | |
parent | 05f62eae063ec1cfe56cbfcc9e99b6dfa989ef90 (diff) | |
download | pango-3c6176158e76399e4e5520efa744b9a88d3d9b64.tar.gz |
Merge branch 'matthiasc/for-main' into 'main'
carets: Fix rect for negative slopes
See merge request GNOME/pango!447
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-layout.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c index f88581f1..ac396ba0 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -2718,12 +2718,16 @@ pango_layout_get_caret_pos (PangoLayout *layout, { strong_pos->x += descender * slope_inv; strong_pos->width = strong_pos->height * slope_inv; + if (slope_inv < 0) + strong_pos->x -= strong_pos->width; } if (weak_pos) { weak_pos->x += descender * slope_inv; weak_pos->width = weak_pos->height * slope_inv; + if (slope_inv < 0) + weak_pos->x -= weak_pos->width; } } } |