summaryrefslogtreecommitdiff
path: root/scene/resources/font.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-15 11:10:42 +0100
committerGitHub <noreply@github.com>2021-02-15 11:10:42 +0100
commitd8691e8ce28fd6899a20bdf76623ee1471862bab (patch)
treefe968dab5b461a24f61f1a0f2c6f98b42b16db93 /scene/resources/font.h
parentfa06d3cf6303506e8d65fe23f9f3c71e49960b88 (diff)
parentf4d095cdd3d04b3215d42928e6b7ac412d78c4c5 (diff)
Merge pull request #46043 from bruvzg/restore_char_and_space_extra_spacing
[TextServer] Restore character and space extra spacing support.
Diffstat (limited to 'scene/resources/font.h')
-rw-r--r--scene/resources/font.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/scene/resources/font.h b/scene/resources/font.h
index a91c9ec7a5..56b5acde1a 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -42,6 +42,13 @@
class FontData : public Resource {
GDCLASS(FontData, Resource);
+public:
+ enum SpacingType {
+ SPACING_GLYPH,
+ SPACING_SPACE,
+ };
+
+private:
RID rid;
int base_size = 16;
String path;
@@ -78,6 +85,9 @@ public:
float get_underline_position(int p_size) const;
float get_underline_thickness(int p_size) const;
+ int get_spacing(int p_type) const;
+ void set_spacing(int p_type, int p_value);
+
void set_antialiased(bool p_antialiased);
bool get_antialiased() const;
@@ -134,7 +144,7 @@ class Font : public Resource {
public:
enum SpacingType {
SPACING_TOP,
- SPACING_BOTTOM
+ SPACING_BOTTOM,
};
private:
@@ -199,6 +209,7 @@ public:
~Font();
};
+VARIANT_ENUM_CAST(FontData::SpacingType);
VARIANT_ENUM_CAST(Font::SpacingType);
/*************************************************************************/