diff --git a/wezterm-gui/src/glyphcache.rs b/wezterm-gui/src/glyphcache.rs index 75a43b7d8..147f155dd 100644 --- a/wezterm-gui/src/glyphcache.rs +++ b/wezterm-gui/src/glyphcache.rs @@ -4377,18 +4377,18 @@ impl GlyphCache { paint.anti_alias = true; let identity = Transform::identity(); - const BIT_INDEX_AND_DOT_POSITION: [(u8, f32, f32); 8] = [ - (0, 0., 0.), - (1, 0., 1.), - (2, 0., 2.), - (3, 1., 0.), - (4, 1., 1.), - (5, 1., 2.), - (6, 0., 3.), - (7, 1., 3.), + const BIT_MASK_AND_DOT_POSITION: [(u8, f32, f32); 8] = [ + (1 << 0, 0., 0.), + (1 << 1, 0., 1.), + (1 << 2, 0., 2.), + (1 << 3, 1., 0.), + (1 << 4, 1., 1.), + (1 << 5, 1., 2.), + (1 << 6, 0., 3.), + (1 << 7, 1., 3.), ]; - for (bit_index, dot_pos_x, dot_pos_y) in &BIT_INDEX_AND_DOT_POSITION { - if dots_pattern & (1 << bit_index) == 0 { + for (bit_mask, dot_pos_x, dot_pos_y) in &BIT_MASK_AND_DOT_POSITION { + if dots_pattern & bit_mask == 0 { // Bit for this dot position is not set continue; }