fn cursor_offset_to_index( offset: usize, text: &str, ui: &Ui, fonts: &Fonts, input_width: f64, ) -> Option<Index>