fn convert_writing_mode(text_node: SvgNode<'_, '_>) -> WritingMode
Expand description
Converts the writing mode.
SVG 2 references CSS Writing Modes Level 3 for the definition of the ‘writing-mode’ property, there are only two writing modes: horizontal left-to-right and vertical right-to-left.
That specification introduces new values for the property. The SVG 1.1 values are obsolete but must still be supported by converting the specified values to computed values as follows:
lr
,lr-tb
,rl
,rl-tb
=>horizontal-tb
tb
,tb-rl
=>vertical-rl
The current vertical-lr
behaves exactly the same as vertical-rl
.
Also, looks like no one really supports the rl
and rl-tb
, except Batik
.
And I’m not sure if its behaviour is correct.
So we will ignore it as well, mainly because I have no idea how exactly it should affect the rendering.