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] Convert control codepoints into zero width space during shaping #17004

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

Gillibald
Copy link
Contributor

What does the pull request do?

This PR changes the current text shaper implementation, transforming non-shapable control codepoints into zero-width space glyphs. So they are not visible in the shaped result.

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0051858-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6
Copy link
Member

I might not understand reasoning behind this, but isn't it common to render for unknown characters? Making it easier to notice problem with a font or text.

@Gillibald
Copy link
Contributor Author

Gillibald commented Sep 14, 2024

This is not about unknown characters. These are still shaped as a replacement glyph. We are just replacing codepoint that have the general category of control. These are usually not visible.

@Gillibald Gillibald added this pull request to the merge queue Sep 14, 2024
Merged via the queue into AvaloniaUI:master with commit 2e83ac1 Sep 14, 2024
11 checks passed
@Gillibald Gillibald deleted the hideControlCodepoints branch September 14, 2024 15:51
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.

3 participants