diff --git a/wezterm-gui/src/shapecache.rs b/wezterm-gui/src/shapecache.rs index b8c5f6b3a..ec4179bdc 100644 --- a/wezterm-gui/src/shapecache.rs +++ b/wezterm-gui/src/shapecache.rs @@ -16,7 +16,6 @@ pub struct ShapeCacheKey { #[derive(Debug, PartialEq)] pub struct GlyphPosition { pub glyph_idx: u32, - pub cluster: u32, pub num_cells: u8, pub x_offset: PixelLength, pub bearing_x: f32, @@ -66,7 +65,6 @@ where .texture .as_ref() .map_or(0, |t| t.coords.width() as u32), - cluster: info.cluster, num_cells: info.num_cells, x_offset: info.x_offset, bearing_x: glyph.bearing_x.get() as f32, @@ -141,12 +139,6 @@ where } else { info.num_cells }; - let cluster = if num_cells > info.num_cells { - info.cluster - .saturating_sub((num_cells - info.num_cells) as u32) - } else { - info.cluster - }; let bearing_x = if num_cells > info.num_cells && glyph.bearing_x.get() < 0. { ((num_cells - info.num_cells) as f64 * render_metrics.cell_size.width as f64) + glyph.bearing_x.get() @@ -157,7 +149,6 @@ where glyph: Rc::clone(&glyph), pos: GlyphPosition { glyph_idx: info.glyph_pos, - cluster, num_cells, x_offset: info.x_offset, bearing_x: bearing_x as f32, @@ -172,7 +163,6 @@ where .texture .as_ref() .map_or(0, |t| t.coords.width() as u32), - cluster: info.cluster, num_cells: info.num_cells, x_offset: info.x_offset, bearing_x: glyph.bearing_x.get() as f32, @@ -351,7 +341,6 @@ mod test { vec![ GlyphPosition { glyph_idx: 180, - cluster: 0, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -359,7 +348,6 @@ mod test { }, GlyphPosition { glyph_idx: 637, - cluster: 1, num_cells: 3, x_offset: PixelLength::new(0.0), bearing_x: 4.0, @@ -438,7 +426,6 @@ mod test { vec![ GlyphPosition { glyph_idx: 180, - cluster: 0, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -446,7 +433,6 @@ mod test { }, GlyphPosition { glyph_idx: 205, - cluster: 1, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 1.0, @@ -460,7 +446,6 @@ mod test { vec![ GlyphPosition { glyph_idx: 180, - cluster: 0, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -468,7 +453,6 @@ mod test { }, GlyphPosition { glyph_idx: 686, - cluster: 1, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -476,7 +460,6 @@ mod test { }, GlyphPosition { glyph_idx: 205, - cluster: 2, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 1.0, @@ -490,7 +473,6 @@ mod test { vec![ GlyphPosition { glyph_idx: 180, - cluster: 0, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -498,7 +480,6 @@ mod test { }, GlyphPosition { glyph_idx: 637, - cluster: 1, num_cells: 3, x_offset: PixelLength::new(0.0), bearing_x: 4.0, @@ -512,7 +493,6 @@ mod test { vec![ GlyphPosition { glyph_idx: 216, - cluster: 0, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 1.0, @@ -520,7 +500,6 @@ mod test { }, GlyphPosition { glyph_idx: 610, - cluster: 1, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -528,7 +507,6 @@ mod test { }, GlyphPosition { glyph_idx: 279, - cluster: 2, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 1.0, @@ -536,7 +514,6 @@ mod test { }, GlyphPosition { glyph_idx: 308, - cluster: 3, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 1.0, @@ -544,7 +521,6 @@ mod test { }, GlyphPosition { glyph_idx: 610, - cluster: 4, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -558,7 +534,6 @@ mod test { vec![ GlyphPosition { glyph_idx: 180, - cluster: 0, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -566,7 +541,6 @@ mod test { }, GlyphPosition { glyph_idx: 686, - cluster: 1, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -574,7 +548,6 @@ mod test { }, GlyphPosition { glyph_idx: 686, - cluster: 2, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -582,7 +555,6 @@ mod test { }, GlyphPosition { glyph_idx: 205, - cluster: 3, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 1.0, @@ -595,7 +567,6 @@ mod test { cluster_and_shape(&render_metrics, &mut glyph_cache, &style, &font, "<-"), vec![GlyphPosition { glyph_idx: 1065, - cluster: 0, num_cells: 2, x_offset: PixelLength::new(0.0), bearing_x: 1.0, @@ -607,7 +578,6 @@ mod test { cluster_and_shape(&render_metrics, &mut glyph_cache, &style, &font, "<>"), vec![GlyphPosition { glyph_idx: 1089, - cluster: 0, num_cells: 2, x_offset: PixelLength::new(0.0), bearing_x: 2.0, @@ -619,7 +589,6 @@ mod test { cluster_and_shape(&render_metrics, &mut glyph_cache, &style, &font, "|=>"), vec![GlyphPosition { glyph_idx: 1040, - cluster: 0, num_cells: 3, x_offset: PixelLength::new(0.0), bearing_x: 2.0, @@ -638,7 +607,6 @@ mod test { ), vec![GlyphPosition { glyph_idx: 790, - cluster: 0, num_cells: 1, x_offset: PixelLength::new(0.0), bearing_x: 0.0, @@ -657,7 +625,6 @@ mod test { ), vec![GlyphPosition { glyph_idx: 32, - cluster: 0, num_cells: 2, x_offset: PixelLength::new(0.0), bearing_x: 7.0, @@ -669,7 +636,6 @@ mod test { cluster_and_shape(&render_metrics, &mut glyph_cache, &style, &font, "