Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hi,

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[1] to ask for help. I also uploaded a
sample document[2] and a screenshot for how it looks[3] with my work.

Some background information if anyone feel interested:
In Taiwan, most people use Zhuyin symbols to mark the pronunciation of a
glyph.
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
vertically
from top to bottom, no matter whether the direction of base text is
horizontal
or vertical[4].

Unlike OOXML that supports rightVertical[5], 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[1],
I change the behavior of aligning ruby text to the top, appending
the SwFieldPortion of the ruby text after the original SwRubyPortion
in BuildMultiPortion.

I got few questions:

a) With my work[2], 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
   object.

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
BuildMultiPortion().
Does it break the semantic? Is it worthy to design a new kind of portion
for this?
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.


[1]https://gerrit.libreoffice.org/#/c/22343/1
[2]https://bugs.documentfoundation.org/attachment.cgi?id=122607
[3]http://imagebin.ca/v/2WoUQwMY8IQn
[4]https://www.w3.org/TR/clreq/#positioning_of_zhuyin
[5]http://www.datypic.com/sc/ooxml/t-w_ST_RubyAlign.html

Best Regards.

-- 
Mark Hung

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.