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).
Copied (with discussion) from: https://github.com/MicrosoftEdge/MSEdgeExplainers/issues/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.
(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
andtext-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).