Open Intelligent2013 opened 2 weeks ago
turn each character in 90 degrees
In XSL-FO there reference-orientation
property, but it relates to the 'area', not for one glyph (https://www.w3.org/TR/2001/REC-xsl-20011015/xslspec.html#reference-orientation).
(In AH there is glyph-orientation
property https://www.antennahouse.com/hubfs/xsl-fo-sample/character/glyph-orientation-1.pdf?hsLang=en)
There is one more idea - replace each character by SVG with text rotating instruction:
<svg xmlns="http://www.w3.org/2000/svg">
<text transform="rotate(90)">B</text>
</svg>
I've tried to replace each character to the SVG with rotated text (one character):
<fo:instream-foreign-object fox:alt-text="{.}">
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15">
<text font-size="14pt" transform="rotate(-90,15,0)"><xsl:value-of select="."/></text></svg>
</fo:instream-foreign-object>
and the resulted PDF looks so: (Note: I know that some English letters didn't rotated.)
Issues:
wrong PDF comments position
I don't sure at all that table auto-layout algorithm will be work properly.
So, this approach is waste of time. It generates a bunch of bugs. Emulate glyph properties via SVG markup is very complicated idea.
Need add support for vertically oriented text for Japanese documents, for instance:
(example from https://www.antennahouse.com/hubfs/xsl-fo-sample/language/writing-mode-1.pdf)
Apache FOP doesn't support a vertical direction property (
tb-rl
), see https://xmlgraphics.apache.org/fop/2.9/complexscripts.html#writing_mode_property.Need try to check that Japanese vertical layout can be achieved with two steps: