diff --git a/docs/changelog.md b/docs/changelog.md index debda28d4..62ad30e9c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -55,7 +55,6 @@ As features stabilize some brief notes about them will accumulate here. * Fixed: wezterm can now match bitmap fonts that are spread across multiple font files [#1189](https://github.com/wez/wezterm/issues/1189) * Improved: [use_cap_height_to_scale_fallback_fonts](config/lua/config/use_cap_height_to_scale_fallback_fonts.md) now computes *cap-height* based on the rasterized glyph bitmap which means that the data is accurate in more cases, including for bitmap fonts. Scaling is now also applied across varying text styles; previously it only applied to a font within an `wezterm.font_with_fallback` font list. * Fixed: ssh config parser incorrectly split `Host` patterns with commas instead of whitespace [#1196](https://github.com/wez/wezterm/issues/1196) -* Fixed: incorrect foreground color when cursor is over parts of a ligatured glyph [#478](https://github.com/wez/wezterm/issues/478) ### 20210814-124438-54e29167 diff --git a/wezterm-gui/src/termwindow/render.rs b/wezterm-gui/src/termwindow/render.rs index b215ec04b..b2f288af1 100644 --- a/wezterm-gui/src/termwindow/render.rs +++ b/wezterm-gui/src/termwindow/render.rs @@ -1652,6 +1652,26 @@ impl super::TermWindow { for info in glyph_info.iter() { let glyph = &info.glyph; + let probably_a_ligature = false; + /* + glyph + .texture + .as_ref() + .map(|t| { + let width = self.render_metrics.cell_size.width as f32; + if t.coords.size.width as f32 > width * 1.5 { + // Glyph is wider than the cell + true + } else if (glyph.bearing_x.get() as f32) < (width / -4.) { + // Has excessive negative bearing + true + } else { + false + } + }) + .unwrap_or(false); + */ + let top = cell_height + (metrics .map(|m| m.descender) @@ -1698,22 +1718,7 @@ impl super::TermWindow { cursor_bg: params.cursor_bg, cursor_border_color: params.cursor_border_color, pane: params.pane, - probably_a_ligature: glyph - .texture - .as_ref() - .map(|t| { - let width = self.render_metrics.cell_size.width as f32; - if t.coords.size.width as f32 > width * 1.5 { - // Glyph is wider than the cell - true - } else if (glyph.bearing_x.get() as f32) < (width / -4.) { - // Has excessive negative bearing - true - } else { - false - } - }) - .unwrap_or(false), + probably_a_ligature, }); let pos_x = (self.dimensions.pixel_width as f32 / -2.)