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 Writing Modes in Canvas Formatted Text #4

Closed
travisleithead opened this issue Sep 23, 2020 · 1 comment · Fixed by #12
Closed

Vertical Writing Modes in Canvas Formatted Text #4

travisleithead opened this issue Sep 23, 2020 · 1 comment · Fixed by #12

Comments

@travisleithead
Copy link
Member

Copied (with discussion) from: MicrosoftEdge/MSEdgeExplainers#372

Text drawing needs to be aware of vertical writing mode to rotate glyphs in some fonts / languages while rendering a line.

The topic needs further investigation.

  • Should metrics be flipped automatically? Are new APIs needed?

(Note existing text APIs in Canvas do not handle this scenario either--a solution would ideally be comprehensive.)


@Malvoz :
/cc @bdon


@kojiishi :

Would it make sense for this to match what CSS renders, by making Canvas aware of writing-mode and text-orientation properties?


@travisleithead

I think finding a way to incorporate those properties into the input to this feature is likely the best way to achieve vertical writing mode.

Currently some values, e.g., "width", and "height" would need to be generalized to make sense in vertical writing modes. I like the idea of reusing some of the terminology in CSS Layout API to do this (as well as aligning on a few other concepts as well).

@proYang
Copy link

proYang commented Mar 24, 2021

This is important for CJK characters. 🔥

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

Successfully merging a pull request may close this issue.

2 participants