[pango/pango-1-48-backports] pango/shape.c: Use the former rounding code as needed
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango-1-48-backports] pango/shape.c: Use the former rounding code as needed
- Date: Mon, 13 Dec 2021 08:37:54 +0000 (UTC)
commit 5cc3aac9622687ca4c50d10fad97c88ad9f72dd4
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Aug 9 16:22:22 2021 +0800
pango/shape.c: Use the former rounding code as needed
The careful rounding code that was brought back as a result of commit
d4356779 only had effect if we are using a backend that supported font
hinting, so on other backends, use the former rounding code that was
dropped in favor of the careful rounding code that unfortunately did not
apply for all backends.
Should fix #578.
pango/shape.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/pango/shape.c b/pango/shape.c
index 401c9ec1..0b757b1a 100644
--- a/pango/shape.c
+++ b/pango/shape.c
@@ -370,5 +370,17 @@ pango_shape_with_flags (const gchar *item_text,
}
}
}
+ else
+ {
+ for (i = 0; i < glyphs->num_glyphs; i++)
+ {
+ glyphs->glyphs[i].geometry.width =
+ PANGO_UNITS_ROUND (glyphs->glyphs[i].geometry.width);
+ glyphs->glyphs[i].geometry.x_offset =
+ PANGO_UNITS_ROUND (glyphs->glyphs[i].geometry.x_offset);
+ glyphs->glyphs[i].geometry.y_offset =
+ PANGO_UNITS_ROUND (glyphs->glyphs[i].geometry.y_offset);
+ }
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]