From de3ffb34283be45d8835353cb0f220f35bf386a5 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 27 Dec 2019 12:02:06 -0800 Subject: [PATCH] fix min underline height I noticed this for small enough sizes of Fira Code the border width for the cursor would round to zero, and then looking at eg: `man ls`, the underlined portions had no underline. Ensure that the underline size is at least 1 pixel. --- src/frontend/gui/utilsprites.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/gui/utilsprites.rs b/src/frontend/gui/utilsprites.rs index 0a8348e79..f41ab3500 100644 --- a/src/frontend/gui/utilsprites.rs +++ b/src/frontend/gui/utilsprites.rs @@ -29,7 +29,7 @@ impl RenderMetrics { metrics.cell_width.get().ceil() as usize, ); - let underline_height = metrics.underline_thickness.get().round() as isize; + let underline_height = metrics.underline_thickness.get().round().max(1.) as isize; let descender_row = (cell_height as f64 + (metrics.descender - metrics.underline_position).get()) as isize;