Function keycap_width

Source
pub fn keycap_width(label: &str, theme: &KitTheme) -> f32
Expand description

Width of keycap for label without drawing it, for laying out rows.

use ferravex_render::ui::kit::{self, KitTheme};
let theme = KitTheme::default();
assert!(kit::keycap_width("Space", &theme) > kit::keycap_width("E", &theme));