diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-29 21:21:10 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-29 21:23:10 -0400 |
commit | 1dee72bfc9597b5564d2f46e704f547fab89b9e8 (patch) | |
tree | a897aca71c7be2fe232da129bfa61fbebc5c4c42 | |
parent | 8bc08dc2900da1cbb34987934b8954fdb576dfeb (diff) | |
download | pango-1dee72bfc9597b5564d2f46e704f547fab89b9e8.tar.gz |
pango-view: Use the new api
Use the new run baseline api to correct
the positioning of glyph extents and caret
positions.
-rw-r--r-- | utils/viewer-pangocairo.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/viewer-pangocairo.c b/utils/viewer-pangocairo.c index 6918d2e9..b35f6f3b 100644 --- a/utils/viewer-pangocairo.c +++ b/utils/viewer-pangocairo.c @@ -434,8 +434,7 @@ render_callback (PangoLayout *layout, pango_layout_iter_get_run_extents (iter, NULL, &rect); x_pos = rect.x; - /* FIXME: need a run baseline */ - y_pos = pango_layout_iter_get_baseline (iter); + y_pos = pango_layout_iter_get_run_baseline (iter); for (int i = 0; i < run->glyphs->num_glyphs; i++) { @@ -504,7 +503,7 @@ render_callback (PangoLayout *layout, offset = g_utf8_strlen (text, start - text); - y = pango_layout_iter_get_baseline (iter); + y = pango_layout_iter_get_run_baseline (iter); trailing = FALSE; p = start; |