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

Vertical text support for TextBox/TextBlock/RichTextBox #7386

Open
rampaa opened this issue Dec 23, 2022 · 3 comments
Open

Vertical text support for TextBox/TextBlock/RichTextBox #7386

rampaa opened this issue Dec 23, 2022 · 3 comments
Labels
Enhancement Requested Product code improvement that does NOT require public API changes/additions
Milestone

Comments

@rampaa
Copy link

rampaa commented Dec 23, 2022

Japanese can be written from top-to-bottom, right-to-left. I would like to be able to present texts in this format in my WPF projects. Petty tricks like rotating the control won't give the desired result.

Suggestion:
Add a new FlowDirection enum like "VerticalRightToLeft" that allows the aforementioned behavior.

@anjali-wpf anjali-wpf added Enhancement Requested Product code improvement that does NOT require public API changes/additions and removed Untriaged labels Dec 26, 2022
@miloush
Copy link
Contributor

miloush commented Dec 28, 2022

While I would love for WPF to be at the frontier of vertical UI layout, this is a non-trivial feature request. The bit in this issue falls mostly into DWrite updates, I believe the LS currently used by WPF do actually support vertical layout, at least how it was done back then.

DWrite approach to configure this is to have separate FlowDirection and ReadingDirection properties though. For reasons I don't know, it looks like WPF's FlowDirection is actually DWrite's ReadingDirection, which is not helping.

@rampaa
Copy link
Author

rampaa commented Mar 4, 2023

I believe the LS currently used by WPF do actually support vertical layout, at least how it was done back then

I don't know what LS stands for in this context (layout structure?) so I might be misinterpreting this whole sentence but let me ask this anyway: How can I try out WPF's current vertical layout support?

@miloush
Copy link
Contributor

miloush commented Mar 5, 2023

LS stands Line Services: https://devblogs.microsoft.com/math-in-office/lineservices/. It is a native code component involved in text layout, it powers rich text box, Word etc.

WPF does not currently support vertical text layout. My note was reflecting the fact that there are two components playing part here. DirectWrite is currently in charge of text shaping more at the character level, while Line Services are involved more at the line level - alignment, tabs etc. At the time when WPF was developed, Line Services (e.g. Word) already supported vertical text layout. However, vertical support in DirectWrite came later. I was trying to suggest that it may be the case that supporting vertical text might get away without significant changes to the Line Service part (which of course would be awesome to update to a newer version too - math anyone?)

@karelz karelz added this to the Future milestone Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Requested Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests

4 participants