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

RichTextLabel: Add Initials / Drop Caps support #1838

Closed
golddotasksquestions opened this issue Nov 14, 2020 · 2 comments · Fixed by godotengine/godot#43691
Closed

RichTextLabel: Add Initials / Drop Caps support #1838

golddotasksquestions opened this issue Nov 14, 2020 · 2 comments · Fixed by godotengine/godot#43691
Milestone

Comments

@golddotasksquestions
Copy link

golddotasksquestions commented Nov 14, 2020

Describe the project you are working on:
Story driven card game

Describe the problem or limitation you are having in your project:
I am in dire need for Initials, also called "Drop Caps" in my project. It is a story driven game and naturally has a lot of text. I would like to carry the graphic design I had made for the already existing printed paper version over to the digital game version to keep consistency.
I also use a wide range of ligatures in this project (often inline text that converts to symbols which are needed to help explaining what the player has to do) but since Godot 3.X did not support ligatures out of the box so far I had put the project on hold. Now that Godot 4 with ligature support is slowly coming in sight, I picked up work on this project again, but quickly realized I would have to give up on an Initials/Drop Caps even though they are a cornerstone visual mark of my project. (I designed a bespoke DropCaps Font just for that project, and they are used throughout as branding).
I was trying hard, but much like ligatures, I have not found a way to "fake" or workaround the lack of DropCaps in Godot.

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

The practice of using a large letter to mark the start of a text has been around for almost two thousand years. Illustrated caps increased usability by marking important passages and guiding readers through the text.

This feature would add a properties "drop_caps_rows", "drop_caps_font" "drop_caps_color" to the RichTextLabel.

The default value for "drop_caps_rows" would be int 1. The value 1 represents status quo. By increasing this value, the size of the first text character increases to match the same number of rows:

drop_caps1

The box matching the rows would adjust to the dimensions of the letter ("I"compared to "M", but also ascenders and descenders if the letter has them), but always keep the height of the row value.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
see above

If this enhancement will not be used often, can it be worked around with a few lines of script?:
Unfortunately it's not possible to work around this, as the paragraph text has to flow around the square space of the dropped first letter.

Is there a reason why this should be core and not an add-on in the asset library?:
It would complete the added Typography tools coming in 4.0.

I would really really appreciate if @bruvzg could spare to take a look at this proposal and let me know if there is any chance this may be included his rewrite for Complex Text Layouts

@Calinou
Copy link
Member

Calinou commented Nov 14, 2020

This feature would add a properties "drop_caps_rows", "drop_caps_font" "drop_caps_color" to the RichTextLabel.

I think only drop_caps_rows is technically necessary. The rest can be done using BBCode tags.

@golddotasksquestions
Copy link
Author

golddotasksquestions commented Nov 14, 2020

Setting a bespoke color and font for the initial is something you always do when using initials.

If I would asign a new text to the Richtextlabel, I would always have to write an extra helper function to paste in the BBCode before and after the first letter.
I really need those initials, so I would take anything if that means Initials become possible, but please let's make user friendly features. Godot has already such a bad UX when it comes to text layout.

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

Successfully merging a pull request may close this issue.

3 participants