Skip to main content

gutter_px

Function gutter_px 

Source
pub fn gutter_px(font_size: f32, line_count: u32) -> f32
Expand description

The gutter’s width in PIXELS for a buffer of line_count lines.

Uses the same MONO_ADVANCE_RATIO estimate cell_grid does — so the gutter and the text agree about how wide a column is, and the text starts exactly where the gutter stops. The column count comes from escriba_ui::gutter::gutter_width, never restated here: the number of columns this face RESERVES and the number the shared model PAINTS have to be the same number, and a second definition is how they stop being.