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

[Text Overrun] Add option to set custom ellipsis character, add support for system font fallback. #82661

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Oct 2, 2023

  • Prefers single (Horizontal Ellipsis, U+2026) over three ... (Full Stop, U+002E) characters.
  • Adds option to set custom ellipsis character.
  • Adds support for system font fallback when looking for ellipsis / dot characters.

@bruvzg bruvzg added this to the 4.x milestone Oct 2, 2023
@bruvzg bruvzg marked this pull request as ready for review October 6, 2023 13:39
@bruvzg bruvzg requested review from a team as code owners October 6, 2023 13:39
scene/gui/line_edit.cpp Outdated Show resolved Hide resolved
@bruvzg bruvzg force-pushed the custom_ellipsis branch 4 times, most recently from 1657314 to c586d87 Compare October 9, 2023 08:12
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected. Example with ellipsis character set to #:

image

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Dec 7, 2023
@YuriSizov
Copy link
Contributor

What would be the use case for this feature?

@AThousandShips
Copy link
Member

I believe this matters for other languages, I think for example it'd be relevant for Chinese characters where period is different

@bruvzg
Copy link
Member Author

bruvzg commented Dec 8, 2023

What would be the use case for this feature?

Using midline ellipsis for CJK, and other language specific variants like Lao ellipsis , Thai ellipsis or Mongolian ellipsis . And using more compact singe character ( or ) instead of 3 dots (to cut less characters).

@akien-mga akien-mga merged commit 4e2350b into godotengine:master Dec 11, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

5 participants