Revert "gpui: Do not render ligatures between different styled text runs (#37175) (#37382)

This reverts commit 62083fe796.

We're reverting this as it causes layout shift when typing/selecting
with ligatures:


https://github.com/user-attachments/assets/80b78909-62f5-404f-8cca-3535c5594ceb

Release Notes:

- Reverted #37175
This commit is contained in:
Marshall Bowers
2025-09-02 16:18:49 +00:00
committed by GitHub
parent 7e3fbeb59d
commit ad3ddd381d
3 changed files with 81 additions and 204 deletions
+14 -1
View File
@@ -501,7 +501,7 @@ impl LineLayoutCache {
} else {
drop(current_frame);
let text = SharedString::from(text);
let unwrapped_layout = self.layout_line::<&SharedString>(&text, font_size, runs, None);
let unwrapped_layout = self.layout_line::<&SharedString>(&text, font_size, runs);
let wrap_boundaries = if let Some(wrap_width) = wrap_width {
unwrapped_layout.compute_wrap_boundaries(text.as_ref(), wrap_width, max_lines)
} else {
@@ -535,6 +535,19 @@ impl LineLayoutCache {
text: Text,
font_size: Pixels,
runs: &[FontRun],
) -> Arc<LineLayout>
where
Text: AsRef<str>,
SharedString: From<Text>,
{
self.layout_line_internal(text, font_size, runs, None)
}
pub fn layout_line_internal<Text>(
&self,
text: Text,
font_size: Pixels,
runs: &[FontRun],
force_width: Option<Pixels>,
) -> Arc<LineLayout>
where