summaryrefslogtreecommitdiff
path: root/servers/text_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/text_server.h')
-rw-r--r--servers/text_server.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/servers/text_server.h b/servers/text_server.h
index a5484d8fbd..f0317c999f 100644
--- a/servers/text_server.h
+++ b/servers/text_server.h
@@ -125,6 +125,12 @@ public:
SPACING_BOTTOM,
};
+ enum FontStyle {
+ FONT_BOLD = 1 << 0,
+ FONT_ITALIC = 1 << 1,
+ FONT_FIXED_WIDTH = 1 << 2,
+ };
+
void _draw_hex_code_box_number(RID p_canvas, int p_size, const Vector2 &p_pos, uint8_t p_index, const Color &p_color) const;
protected:
@@ -224,6 +230,15 @@ public:
virtual void font_set_data(RID p_font_rid, const PackedByteArray &p_data) = 0;
virtual void font_set_data_ptr(RID p_font_rid, const uint8_t *p_data_ptr, size_t p_data_size) = 0;
+ virtual void font_set_style(RID p_font_rid, uint32_t /*FontStyle*/ p_style) = 0;
+ virtual uint32_t /*FontStyle*/ font_get_style(RID p_font_rid) const = 0;
+
+ virtual void font_set_name(RID p_font_rid, const String &p_name) = 0;
+ virtual String font_get_name(RID p_font_rid) const = 0;
+
+ virtual void font_set_style_name(RID p_font_rid, const String &p_name) = 0;
+ virtual String font_get_style_name(RID p_font_rid) const = 0;
+
virtual void font_set_antialiased(RID p_font_rid, bool p_antialiased) = 0;
virtual bool font_is_antialiased(RID p_font_rid) const = 0;
@@ -535,6 +550,7 @@ VARIANT_ENUM_CAST(TextServer::Hinting);
VARIANT_ENUM_CAST(TextServer::Feature);
VARIANT_ENUM_CAST(TextServer::ContourPointTag);
VARIANT_ENUM_CAST(TextServer::SpacingType);
+VARIANT_ENUM_CAST(TextServer::FontStyle);
GDVIRTUAL_NATIVE_PTR(Glyph);
GDVIRTUAL_NATIVE_PTR(Glyph *);