Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As it stands, CharFXTransform's Font property is an RID, which means only font-related functionality from TextServer can be used. This disallows the use of any of Font's functions, such as
get_string_size
, since the RID can't be used to reconstruct the Font from the buffer. The only other way to use Font-exclusive functionality that doesn't exist on TextServer is to get the theme, then get all the fonts, and compare each font's RID until it matches the one inside the CharFXTransform. This makes certain operations inside RichTextEffect cumbersome to perform.Solutions to this could come in many forms, such as storing the font's string ID (which would make getting it from the theme much easier, i.e. without iterating) or by adding a function to get the used
Font
(or one of its derivative types) directly. Alternatively, maybe a way to use the font's RID to (re)construct one of theFont
classes from the buffer.Beta Was this translation helpful? Give feedback.
All reactions