Merge pull request #52890 from bruvzg/rtl_effects_connected

Improve connected grapheme handling in the RTL CharFX.
This commit is contained in:
Rémi Verschelde
2021-09-21 13:33:44 +02:00
committed by GitHub
9 changed files with 136 additions and 30 deletions

View File

@ -28,6 +28,12 @@
<member name="font" type="RID" setter="set_font" getter="get_font">
Font resource used to render glyph.
</member>
<member name="glyph_count" type="int" setter="set_glyph_count" getter="get_glyph_count" default="0">
Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. Setting this property won't affect drawing.
</member>
<member name="glyph_flags" type="int" setter="set_glyph_flags" getter="get_glyph_flags" default="0">
Glyph flags. See [enum TextServer.GraphemeFlag] for more info. Setting this property won't affect drawing.
</member>
<member name="glyph_index" type="int" setter="set_glyph_index" getter="get_glyph_index" default="0">
Font specific glyph index.
</member>

View File

@ -1247,6 +1247,12 @@
<constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag">
Grapheme is punctuation character.
</constant>
<constant name="GRAPHEME_IS_UNDERSCORE" value="512" enum="GraphemeFlag">
Grapheme is underscore character.
</constant>
<constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag">
Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
</constant>
<constant name="HINTING_NONE" value="0" enum="Hinting">
Disables font hinting (smoother but less crisp).
</constant>