[pango/matthiasc/for-main: 3/3] pango-view: Use the new api
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/matthiasc/for-main: 3/3] pango-view: Use the new api
- Date: Mon, 30 Aug 2021 01:25:06 +0000 (UTC)
commit 1dee72bfc9597b5564d2f46e704f547fab89b9e8
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Aug 29 21:21:10 2021 -0400
pango-view: Use the new api
Use the new run baseline api to correct
the positioning of glyph extents and caret
positions.
utils/viewer-pangocairo.c | 5 ++---
1 file 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]