pub fn get_offset_for_position(text: &str, x: f32, y: f32) -> usize
Returns byte offset in text for given x position. Used for cursor positioning on click.