<div dir="ltr"><div>Hi,</div><div><br></div><div>I had started to work on tdf#35301 to support aligning ruby text</div><div>vertically right to its base text. Despite I've read OOo Writer core </div><div>documents, I still know too little to complete or justify my work. </div><div>I submitted my preliminary work[1] to ask for help. I also uploaded a <br></div><div>sample document[2] and a screenshot for how it looks[3] with my work.</div><div><br></div><div>Some background information if anyone feel interested:</div><div>In Taiwan, most people use Zhuyin symbols to mark the pronunciation of a glyph.</div><div>Aligning ruby text to the top is valid but rarely used.</div><div>Most of people mark the symbols at the right side of each glyph, written vertically </div><div>from top to bottom, no matter whether the direction of base text is horizontal </div><div>or vertical[4].</div><div><br></div><div>Unlike OOXML that supports rightVertical[5], there isn't such type </div><div>of ruby text alignment in ODF yet. Storing it in odf document would be</div><div>another problem. I plan to handle layout issue first. In my work[1],</div><div>I change the behavior of aligning ruby text to the top, appending</div><div>the SwFieldPortion of the ruby text after the original SwRubyPortion</div><div>in BuildMultiPortion.</div><div> </div><div>I got few questions:</div><div><br></div><div>a) With my work[2], the ruby text is shifted downward, doesn't match</div><div> its shading area. How can I move it up? I'm trying to</div><div> change rInfo.Y() in SwFieldPortion::Pain() but it seems to be a const</div><div> object.</div><div><br></div><div>b) When delete a portion with backspace, previous ruby text is deleted. </div><div>Cursor is placed between last ruby text and next glyph.</div><div>I know these situations have something to do with </div><div>SwTextFormatInfo::SetIdx(), and maybe SwTextFormatInfo::SeekAndChg(),</div><div>but how to do it properly?</div><div><br></div><div>c) My work reuse SwFieldPortion for ruby text, and append it in BuildMultiPortion().</div><div>Does it break the semantic? Is it worthy to design a new kind of portion for this?</div><div>Or should I change BuildMultiPortion and PaintMultiPortion?</div><div><br></div><div>d) What does the Rest of a SwTextFormatInfo mean?<br></div><div><br></div><div><br></div><div>The mail is quite lengthy. Thanks for anyone paying attention to this.</div><div><br></div><div><br></div><div>[1]<a href="https://gerrit.libreoffice.org/#/c/22343/1">https://gerrit.libreoffice.org/#/c/22343/1</a><br></div><div><div>[2]<a href="https://bugs.documentfoundation.org/attachment.cgi?id=122607">https://bugs.documentfoundation.org/attachment.cgi?id=122607</a></div><div>[3]<a href="http://imagebin.ca/v/2WoUQwMY8IQn">http://imagebin.ca/v/2WoUQwMY8IQn</a><br></div></div><div>[4]<a href="https://www.w3.org/TR/clreq/#positioning_of_zhuyin">https://www.w3.org/TR/clreq/#positioning_of_zhuyin</a><br></div><div>[5]<a href="http://www.datypic.com/sc/ooxml/t-w_ST_RubyAlign.html">http://www.datypic.com/sc/ooxml/t-w_ST_RubyAlign.html</a><br></div><div><br></div><div><div>Best Regards.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Mark Hung<br></div></div></div>
</div>