diff --git a/crates/epaint/src/text/text_layout.rs b/crates/epaint/src/text/text_layout.rs index b20019eff..149b4972b 100644 --- a/crates/epaint/src/text/text_layout.rs +++ b/crates/epaint/src/text/text_layout.rs @@ -605,11 +605,12 @@ fn galley_from_rows( glyph.pos.y = cursor_y + glyph.font_impl_ascent - + format.valign.to_factor() * (row_height - glyph.font_impl_height) + // Apply valign to the different in height of the entire row, and the height of this `Font`: + + format.valign.to_factor() * (row_height - glyph.size.y) // When mixing different `FontImpl` (e.g. latin and emojis), // we always center the difference: - + 0.5 * (glyph.font_impl_height - glyph.size.y); + + 0.5 * (glyph.size.y - glyph.font_impl_height); glyph.pos.y = point_scale.round_to_pixel(glyph.pos.y); }