You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This proposal is follow up to #4, to get some community feedback/preferences on a specific parts of CTL support implementation.
Describe the project you are working on:
The Godot Engine
Describe the problem or limitation you are having in your project:
Currently, the only way to output rich text is RichTextLabel / "BBCode", outputting CTL aware text requires its integration with the BiDi/shaping engine.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
🔹 Complex text is context dependent and to display it correctly whole paragraphs of the text should be passed to the BiDi/shaping engine at once (and if the paragraph contains segments using different fonts this information is required during shaping too).
🔹 Inline images and table are part of the text, they can affect its processing and should be accounted during BiDi/shaping as well (only it's position in the string is relevant).
🔹 After breaking paragraph into the lines, each line should be additionally processed by the BiDi/shaping engine. (Order of line parts can change).
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Rich text representation?
🔹 Keep it to RichTextLabel only, and handle CTL in the control itself using low-level functions.
🔹 "BBCode" processing can be fully moved to the shaping engine.
There's no clear paragraph separation (might be changed by adding
tag, or some other rules, like double new lines) and reshaping whole large text on each change can be slow.
🔹 Some intermediate implementation can be used (which will be accessible outside RichTextLabel, and won't need to handle RichTextLabel specific tasks like tables and hyperlinks).
AttributedString/Spannable` (as implemented in godot_tl module).
🔹 Something else?
Do we need rich text output outside RTL?
Do we need rich text WYSIWYG editing capabilities?
If this enhancement will not be used often, can it be worked around with a few lines of script?:
It will be used by RichTextLabel controls and maybe in other ways to output/input formatted text.
Is there a reason why this should be core and not an add-on in the asset library?:
RichTextLabel is part of core, used by editor.
The text was updated successfully, but these errors were encountered:
Being able to use multiple fonts to draw text could be desirable for certain items.
See these examples for search results in Godot, Sublime Text and VS Code
This can be used for highlighting character matches in search results (in ItemList/Tree, Inspector etc.) or scaling certain text down or up to create contrast. Using Control nodes such as Containers and Labels does allow multiple fonts (Project Manager), but it is expensive and doesn't allow character highlighting.
I understand these classes are deliberately kept simple, but it seems like the functionality would be common between multiple classes.
This proposal is follow up to #4, to get some community feedback/preferences on a specific parts of CTL support implementation.
Describe the project you are working on:
The Godot Engine
Describe the problem or limitation you are having in your project:
Currently, the only way to output rich text is
RichTextLabel
/ "BBCode", outputting CTL aware text requires its integration with the BiDi/shaping engine.Describe the feature / enhancement and how it helps to overcome the problem or limitation:
🔹 Complex text is context dependent and to display it correctly whole paragraphs of the text should be passed to the BiDi/shaping engine at once (and if the paragraph contains segments using different fonts this information is required during shaping too).
🔹 Inline images and table are part of the text, they can affect its processing and should be accounted during BiDi/shaping as well (only it's position in the string is relevant).
🔹 After breaking paragraph into the lines, each line should be additionally processed by the BiDi/shaping engine. (Order of line parts can change).
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Rich text representation?
🔹 Keep it to
RichTextLabel
only, and handle CTL in the control itself using low-level functions.🔹 "BBCode" processing can be fully moved to the shaping engine.
There's no clear paragraph separation (might be changed by adding
tag, or some other rules, like double new lines) and reshaping whole large text on each change can be slow.
🔹 Some intermediate implementation can be used (which will be accessible outside
RichTextLabel
, and won't need to handleRichTextLabel
specific tasks like tables and hyperlinks).AttributedString/
Spannable` (as implemented in godot_tl module).🔹 Something else?
Do we need rich text output outside RTL?
Do we need rich text WYSIWYG editing capabilities?
If this enhancement will not be used often, can it be worked around with a few lines of script?:
It will be used by
RichTextLabel
controls and maybe in other ways to output/input formatted text.Is there a reason why this should be core and not an add-on in the asset library?:
RichTextLabel is part of core, used by editor.
The text was updated successfully, but these errors were encountered: