summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-08-03 16:00:50 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-08-03 16:30:23 -0400
commit7d3e528978ee1a1b5f1e12eaa09ad13fa8b13606 (patch)
tree61a3035eb4df09147d5f9a471e06834dc82dfd4b
parent77b78746c901f95ca45a9ccffe9c32a38c0fb32b (diff)
downloadpango-7d3e528978ee1a1b5f1e12eaa09ad13fa8b13606.tar.gz
layout: Use the new glyph rounding option
Take the glyph rounding option from PangoContext and translate it into a shape flag.
-rw-r--r--pango/pango-layout.c12
1 files 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)
{