Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font Styles in Text Editor #7527

Closed
gro-david opened this issue Aug 19, 2023 · 4 comments
Closed

Font Styles in Text Editor #7527

gro-david opened this issue Aug 19, 2023 · 4 comments

Comments

@gro-david
Copy link

Describe the project you are working on

The context is not really important here, but i am working on a 2D rogue-like.

Describe the problem or limitation you are having in your project

After a long day of working differentiating between the different code elements can be straining for the eyes even with a readable font and color choices.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

In Editor Settings/Text Editor/Theme you could have checkboxes to the side of the color selection for bold, italic and underlined.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

It would work alongside the coloring of the different keywords in the default editor. For example comments would be italic as well and would make it more distinguishable.

If this enhancement will not be used often, can it be worked around with a few lines of script?

I do not think this could be solved with an editor plugin but if it is solvable, i would be more than happy to do it myself if someone could point me in the right direction.

Is there a reason why this should be core and not an add-on in the asset library?

This is about the default editor.

@Calinou
Copy link
Member

Calinou commented Aug 19, 2023

Thanks for the proposal! Consolidating in #1781.

@gro-david
Copy link
Author

Just a quick question after reading through #1781:
This may be quite a dumb question, because i haven't read through the source code....
If I understand correctly a syntax highlighter in the ScriptEditor is telling the ScriptEditor in which color to display the different keywords. This color doesn't need to be saved it gets applied dynamically, I personally don't see anything getting in way of the same procedure with different font styles. So how is this color getting applied? I am thinking about loading multiple fonts and applying them like we apply the font color.

@gro-david
Copy link
Author

Also: how is the RichTextLabel displaying multiple font styles? Maybe some of that code could be reused...

@AThousandShips
Copy link
Member

Please make these comments over in that issue instead of here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants