Implement basic vertical text direction support#7399
Closed
SFizz405 wants to merge 1 commit intotypst:mainfrom
Closed
Implement basic vertical text direction support#7399SFizz405 wants to merge 1 commit intotypst:mainfrom
SFizz405 wants to merge 1 commit intotypst:mainfrom
Conversation
Co-authored-by: RaikiSakaguchi <[email protected]> Co-authored-by: GenOgane <[email protected]>
Author
|
Will create a new PR after fixing issues with the checks. |
Collaborator
I strongly suggest communicating with the team on discord before creating one |
Member
|
Thanks for your effort, but a PR for vertical writing is not something we would merge at this time as we do not have sufficient capacity to maintain and quality control these code paths. |
Author
|
Thank you for the comments. We apologize for not following the contribution steps and communicating before implementing: this was a class project at uni, and we didn't plan on contributing at all when we made the changes. Thanks for Typst, and good luck to anyone attempting to implement vertical text support. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds very minimal vertical text direction (mainly TTB-RTL) support.
TTBandBTTdirections were already present in the code, but were largely unimplemented and ignored; this PR attempts to implement some of the basic required features. The features proposed in RFC #5908 are not implemented at all: hopefully this PR provides the basis.Importantly, merging this PR should not alter the output of any .typ file, unless the text direction is explicitly set to TTB (with something like
set #text(dir: ttb)).Changes
Since the goal was to extend the support of text directions (
LTR,RTL) to vertical directions, most of the changes abstract direction for logic written with horizontal text direction in mind. Additions of new fields to structs were avoided when the struct is widely used, while new fields were added to structs that were primarily used with text direction logic.Issues
The support for vertical text direction is minimal at best, and some essential features are left unimplemented. Some missing essential features include:
Notes
Most of the testing was done in Japanese. Using other languages may produce more bugs.
This PR was written by @SFizz405, @RaikiSakaguchi, and @GenOgane. This is our first ever PR to a large repo, and we do not have a lot of experience with Rust; apologies in advance for any bad code. We understand that our PR may not meet the minimal required quality for merging.