Implementing a new type of ruby text alignment in Writer
marklh9 at gmail.com
Sat Feb 13 14:31:28 UTC 2016
I had started to work on tdf#35301 to support aligning ruby text
vertically right to its base text. Despite I've read OOo Writer core
documents, I still know too little to complete or justify my work.
I submitted my preliminary work to ask for help. I also uploaded a
sample document and a screenshot for how it looks with my work.
Some background information if anyone feel interested:
In Taiwan, most people use Zhuyin symbols to mark the pronunciation of a
Aligning ruby text to the top is valid but rarely used.
Most of people mark the symbols at the right side of each glyph, written
from top to bottom, no matter whether the direction of base text is
Unlike OOXML that supports rightVertical, there isn't such type
of ruby text alignment in ODF yet. Storing it in odf document would be
another problem. I plan to handle layout issue first. In my work,
I change the behavior of aligning ruby text to the top, appending
the SwFieldPortion of the ruby text after the original SwRubyPortion
I got few questions:
a) With my work, the ruby text is shifted downward, doesn't match
its shading area. How can I move it up? I'm trying to
change rInfo.Y() in SwFieldPortion::Pain() but it seems to be a const
b) When delete a portion with backspace, previous ruby text is deleted.
Cursor is placed between last ruby text and next glyph.
I know these situations have something to do with
SwTextFormatInfo::SetIdx(), and maybe SwTextFormatInfo::SeekAndChg(),
but how to do it properly?
c) My work reuse SwFieldPortion for ruby text, and append it in
Does it break the semantic? Is it worthy to design a new kind of portion
Or should I change BuildMultiPortion and PaintMultiPortion?
d) What does the Rest of a SwTextFormatInfo mean?
The mail is quite lengthy. Thanks for anyone paying attention to this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LibreOffice