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

Handle TabStopps #7044

Merged
merged 10 commits into from
Dec 6, 2021
Merged

Conversation

Gillibald
Copy link
Contributor

@Gillibald Gillibald commented Nov 30, 2021

What does the pull request do?

It substitutes \t character into whitespaces

Screenshot 2021-11-30 145207

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

@Gillibald Gillibald changed the title [WIP] Handle TabStopps Handle TabStopps Dec 1, 2021
case '\t':
{
glyph = glyphTypeface.GetGlyph(' ');
advance = glyphTypeface.GetGlyphAdvance(glyph) * scale * 4;
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest making the tab width configurable like in .editorconfig .

@workgroupengineering
Copy link
Contributor

another improvement that could be made in the future is to add a TabStop collection as it does in Word.

@Gillibald
Copy link
Contributor Author

This PR mainly targets current release 0.10 everything will be replaced by the TextFormatter API. You will be able to customize tab width etc.

@grokys grokys merged commit 39e1e50 into AvaloniaUI:master Dec 6, 2021
@Gillibald Gillibald deleted the feature/handleTabstopps branch December 6, 2021 16:24
danwalmsley pushed a commit that referenced this pull request Dec 7, 2021
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.

4 participants