1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

[Font Import] Detect pixel fonts and disable subpixel positioning.

This commit is contained in:
bruvzg
2024-07-22 10:12:00 +03:00
parent 8e36f98ea5
commit 32bc1c2f33
13 changed files with 128 additions and 3 deletions

View File

@@ -196,6 +196,7 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_font_has_char, "font_rid", "char");
GDVIRTUAL_BIND(_font_get_supported_chars, "font_rid");
GDVIRTUAL_BIND(_font_get_supported_glyphs, "font_rid");
GDVIRTUAL_BIND(_font_render_range, "font_rid", "size", "start", "end");
GDVIRTUAL_BIND(_font_render_glyph, "font_rid", "size", "index");
@@ -927,6 +928,12 @@ String TextServerExtension::font_get_supported_chars(const RID &p_font_rid) cons
return ret;
}
PackedInt32Array TextServerExtension::font_get_supported_glyphs(const RID &p_font_rid) const {
PackedInt32Array ret;
GDVIRTUAL_REQUIRED_CALL(_font_get_supported_glyphs, p_font_rid, ret);
return ret;
}
void TextServerExtension::font_render_range(const RID &p_font_rid, const Vector2i &p_size, int64_t p_start, int64_t p_end) {
GDVIRTUAL_CALL(_font_render_range, p_font_rid, p_size, p_start, p_end);
}