diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-10 14:25:04 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-10 14:25:04 +0100 |
| commit | 902c2ea1215ab98db7e7047ac7b8e5fc0b50c3fe (patch) | |
| tree | 179d0835e2c8f994405e052467a6d5b74e6daa88 | |
| parent | 2c13ff9bfe9aea9537938fc957d90a2b798bba2f (diff) | |
Fix y offset in shaper
| -rw-r--r-- | library/src/text/shaping.rs | 2 | ||||
| -rw-r--r-- | tests/ref/layout/columns.png | bin | 107086 -> 107087 bytes | |||
| -rw-r--r-- | tests/ref/layout/par-bidi.png | bin | 25285 -> 25290 bytes | |||
| -rw-r--r-- | tests/ref/layout/par-indent.png | bin | 47226 -> 47225 bytes |
4 files changed, 1 insertions, 1 deletions
diff --git a/library/src/text/shaping.rs b/library/src/text/shaping.rs index feb9b24b..d5e55686 100644 --- a/library/src/text/shaping.rs +++ b/library/src/text/shaping.rs @@ -96,7 +96,7 @@ impl<'a> ShapedText<'a> { for ((font, y_offset), group) in self.glyphs.as_ref().group_by_key(|g| (g.font.clone(), g.y_offset)) { - let pos = Point::new(offset, top + shift + y_offset.at(self.size)); + let pos = Point::new(offset, top + shift - y_offset.at(self.size)); let glyphs = group .iter() .map(|glyph| Glyph { diff --git a/tests/ref/layout/columns.png b/tests/ref/layout/columns.png Binary files differindex 4bf76146..51fd5b2c 100644 --- a/tests/ref/layout/columns.png +++ b/tests/ref/layout/columns.png diff --git a/tests/ref/layout/par-bidi.png b/tests/ref/layout/par-bidi.png Binary files differindex 0406fbf1..8751d93e 100644 --- a/tests/ref/layout/par-bidi.png +++ b/tests/ref/layout/par-bidi.png diff --git a/tests/ref/layout/par-indent.png b/tests/ref/layout/par-indent.png Binary files differindex 7aca22c1..269c0024 100644 --- a/tests/ref/layout/par-indent.png +++ b/tests/ref/layout/par-indent.png |
