[pango/round-glyphs-option: 3/4] layout: Use the new glyph rounding option
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/round-glyphs-option: 3/4] layout: Use the new glyph rounding option
- Date: Sat, 3 Aug 2019 20:05:05 +0000 (UTC)
commit 73a89418150be0ce9f81319455f74b60ac1518e0
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 3 16:00:50 2019 -0400
layout: Use the new glyph rounding option
Take the glyph rounding option from PangoContext
and translate it into a shape flag.
pango/pango-layout.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 521f806a..0ddb6e14 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -3354,14 +3354,20 @@ shape_run (PangoLayoutLine *line,
shape_tab (line, item, glyphs);
else
{
+ PangoShapeFlags shape_flags = PANGO_SHAPE_NONE;
+
+ if (pango_context_get_round_glyph_positions (layout->context))
+ shape_flags |= PANGO_SHAPE_ROUND_POSITIONS;
+
if (state->properties.shape_set)
_pango_shape_shape (layout->text + item->offset, item->num_chars,
state->properties.shape_ink_rect, state->properties.shape_logical_rect,
glyphs);
else
- pango_shape_full (layout->text + item->offset, item->length,
- layout->text, layout->length,
- &item->analysis, glyphs);
+ pango_shape_with_flags (layout->text + item->offset, item->length,
+ layout->text, layout->length,
+ &item->analysis, glyphs,
+ shape_flags);
if (state->properties.letter_spacing)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]