Grid display line
Contents
History
- Last update: March 4, 2008 by tora
Goals
This sub-project aims at making grid lines for Grid (lines only) - covering Grid (lines and character spacing) - appropriate to meet Asian culture.
Expectations No grid Grid (lines only) Grid (lines and characters) The above pictures are taken with OpenOffice.org 2.3 plus accomplishments of this project running on Linux and then positions of characters are slightly - by a few dots - tweaked to make better, ideal layout.
Background
The pictures below are taken with pure OpenOffice.org 2.3 running on Windows.
Facts No grid Grid (lines only) Grid (lines and characters)
- Two grid lines are drawn for a single text line in the Grid (lines only) mode.
- A ruby portion is wrongly positioned in the No grid mode. This problem will be discussed separately in an article Wrong_position_of_ruby_text.
Sample files
Approach
- Height of line could be addition of base text height and ruby text height.
- No distinguishing ruby text from base text is needed.
- An entry 'Automatic' from the Text-to-text Alignments of Paragraph style could be treated as 'Middle' regardless of direction of writing.
- Even though, the ODF specifications in the section of , says 'Automatic' is treated as 'Base line' for horizontal writing and 'Middle' for vertical writing, 'Automatic' could be always treated as 'Middle' for Grid (lines only).
- Both horizontal writing and vertical writing are well supported, especially non-Asian letters should be treated appropriately.
- Text-to-text Alignments of Paragraph should be treated as well, even though the similar application seems not to able to recognize this attribute in the grid mode.
Text-to-text Alignments
File format
No modification might be needed for the ODF file format.
A set of Text-to-text alignment is defined in the section "15.5.35 Vertical Alignment" of "Open Document Format for Office Applications (OpenDocument) v1.1" [1]
Is says that "auto - Automatically, which sets the vertical alignment to suit the text rotation. Text that is rotated 0 or 90 degrees is aligned to the baseline, while text that is rotated 270 degrees is aligned to the center of the line." It, however, does not mention about Grid layout.
Resources
No text has been added.
Modules
The following modules have been modified.
Module Modifications sw
- SwPageFrm::PaintGrid() in sw/source/core/layout/paintfrm.cxx
- SwTxtCrsr::AdjustBaseLine() in sw/source/core/text/itrtxt.cxx
- SwTxtFormatter::CalcRealHeight in sw/source/core/text/itrform2.cxx
- and more...
Online help
No text has been added to the online help.