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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/servers/text_server.h b/servers/text_server.h
index 629a633b9f..38ad496490 100644
--- a/servers/text_server.h
+++ b/servers/text_server.h
@@ -101,6 +101,16 @@ public:
HINTING_NORMAL
};
+ enum SubpixelPositioning {
+ SUBPIXEL_POSITIONING_DISABLED,
+ SUBPIXEL_POSITIONING_AUTO,
+ SUBPIXEL_POSITIONING_ONE_HALF,
+ SUBPIXEL_POSITIONING_ONE_QUARTER,
+ };
+
+ const int SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE = 20;
+ const int SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE = 16;
+
enum Feature {
FEATURE_BIDI_LAYOUT = 1 << 0,
FEATURE_VERTICAL_LAYOUT = 1 << 1,
@@ -248,6 +258,9 @@ public:
virtual void font_set_hinting(RID p_font_rid, Hinting p_hinting) = 0;
virtual Hinting font_get_hinting(RID p_font_rid) const = 0;
+ virtual void font_set_subpixel_positioning(RID p_font_rid, SubpixelPositioning p_subpixel) = 0;
+ virtual SubpixelPositioning font_get_subpixel_positioning(RID p_font_rid) const = 0;
+
virtual void font_set_variation_coordinates(RID p_font_rid, const Dictionary &p_variation_coordinates) = 0;
virtual Dictionary font_get_variation_coordinates(RID p_font_rid) const = 0;
@@ -551,6 +564,7 @@ VARIANT_ENUM_CAST(TextServer::LineBreakFlag);
VARIANT_ENUM_CAST(TextServer::TextOverrunFlag);
VARIANT_ENUM_CAST(TextServer::GraphemeFlag);
VARIANT_ENUM_CAST(TextServer::Hinting);
+VARIANT_ENUM_CAST(TextServer::SubpixelPositioning);
VARIANT_ENUM_CAST(TextServer::Feature);
VARIANT_ENUM_CAST(TextServer::ContourPointTag);
VARIANT_ENUM_CAST(TextServer::SpacingType);