### Godot version

v4.0.2.stable.official [7a0977ce2]

### System information

Windows 10, not platform specific

### Issue description

Methods `get_character_line` and `get_character_paragraph` return wrong indices for characters that are first in the respective line/paragraph. See the attached screenshot.

![image](https://user-images.githubusercontent.com/892180/236546781-692603be-eb09-419e-822e-d4152a66d9b6.png)


### Steps to reproduce

Run attached project.

The script goes through all characters in `RichTextLabel` and prints the respective character, line index, and paragraph index. None of them should be -1 since we are iterating through valid indices.

### Minimal reproduction project

[RichTextLabel.zip](https://github.com/godotengine/godot/files/11409399/RichTextLabel.zip)

if (rtl) {
			float offx = 0.0f;
			if (!lrtl && p_frame == main) { 
				offx -= scroll_w;
			}
			font->draw_string(ci, p_ofs + Vector2(p_width - l.offset.x + offx, l.text_buf->get_line_ascent(0)), " " + prefix, HORIZONTAL_ALIGNMENT_LEFT, l.offset.x, font_size, _find_color(l.from, p_base_color));
		} else {
			float offx = 0.0f;
			if (lrtl && p_frame == main) { 
				offx += scroll_w;
			}
			font->draw_string(ci, p_ofs + Vector2(offx, l.text_buf->get_line_ascent(0)), prefix + " ", HORIZONTAL_ALIGNMENT_RIGHT, l.offset.x, font_size, _find_color(l.from, p_base_color));
		}
	}
	
	int dc_lines = l.text_buf->get_dropcap_lines();
	float h_off = l.text_buf->get_dropcap_size().x;
	if (l.dc_ol_size > 0) {
		l.text_buf->draw_dropcap_outline(ci, p_ofs + ((rtl) ? Vector2() : Vector2(l.offset.x, 0)), l.dc_ol_size, l.dc_ol_color);
	}
	l.text_buf->draw_dropcap(ci, p_ofs + ((rtl) ? Vector2() : Vector2(l.offset.x, 0)), l.dc_color);
	int line_count = 0;
	Size2 ctrl_size = get_size();
	
	for (int line = 0; line < l.text_buf->get_line_count(); line++) {
		if (line > 0) {
			off.y += theme_cache.line_separation;
		}
		if (p_ofs.y + off.y >= ctrl_size.height) {
			break;