ODF specification for border around text portions
Regina Henschel
rb.henschel at t-online.de
Sun Jul 29 22:36:01 UTC 2018
Hi all,
you can draw borders on portions of text in Writer. This is currently in
loext namespace. I'm working to get this feature to ODF.
I have noticed the problems described below, when looking what would be
needed for interoperability with Word and what would be needed for EPUB
export.
I would be happy to hear some suggestions from you.
Problem line height
-------------------
EPUB: EPUB uses XHTML and CSS3. Border, margin and padding does not
influence the line-height calculation in CSS. Therefore the margin-,
border- and padding-box might overlap previous or next lines. But the
text inside the box is always regularly visible. Overlapping happens in
document order. The border will be painted on top of the previous line
and the next line will be painted on top of the border.
MS Word: Word acts different. If the line-height is proportional (e.g.
1.5 lines) the distance between lines is increased, so that the entire
box fits into the line. The additional space is distributed so that the
text in the box has the same baseline as the text outside the box. If
the line-height is fixed (e.g. 24pt), the height of the box is reduced
(not the border width) so that the border might overlap the text inside
the box. The border is drawn on top of the text.
LibreOffice's line height implementation has currently bug
https://bugs.documentfoundation.org/show_bug.cgi?id=69647
Problem line break
------------------
EPUB: If the text portion, which has got border, margin, padding is
split so that the start of the text portion is in line A and the end is
in the next line B, then the border box is split in CSS. That means,
that the box in line A has no right border and the box in line B has not
left border (in ltr script).
MS Word: Word acts different. It enclosed the text porting in line A
with a complete box and encloses the text porting in line B with a
complete box too.
Currently LibreOffice follows the way Word does it.
Kind regards
Regina
More information about the LibreOffice
mailing list