Drawing char.
| 465 | |
| 466 | // Drawing char. |
| 467 | Size2 Font::get_char_size(char32_t p_char, int p_font_size) const |
| 468 | { |
| 469 | if (dirty_rids) |
| 470 | { |
| 471 | _update_rids(); |
| 472 | } |
| 473 | for (int i = 0; i < rids.size(); i++) |
| 474 | { |
| 475 | if (TS->font_has_char(rids[i], p_char)) |
| 476 | { |
| 477 | int32_t glyph = (int32_t)TS->font_get_glyph_index(rids[i], p_font_size, p_char, 0); |
| 478 | return Size2(TS->font_get_glyph_advance(rids[i], p_font_size, glyph).x, get_height(p_font_size)); |
| 479 | } |
| 480 | } |
| 481 | return Size2(); |
| 482 | } |
| 483 | |
| 484 | real_t Font::draw_char(RID p_canvas_item, const Point2& p_pos, char32_t p_char, int p_font_size, const Color& p_modulate) const |
| 485 | { |
nothing calls this directly
no test coverage detected