https://bugs.documentfoundation.org/show_bug.cgi?id=163520
Bug ID: 163520
Summary: v-alignment mechanism makes strange/invalid
assumptions regarding v-spacing and its location
Product: LibreOffice
Version: 24.8.2.1 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Created attachment 197143
--> https://bugs.documentfoundation.org/attachment.cgi?id=197143&action=edit
vertical alignment illustrations
Consider the attached presentation with several textboxes on each slide:
The first slide uses our Liberation Serif font.
You will note that the vertical alignment logic aligns-bottom so that the
descender just touches the rectangle edge; but aligns-top so that there is
quite some distance between the ascender height and the top of the rectangle.
It seems this distance is about what you would find as the distance to a
preceding line of text, whose baseline is the top edge of the rectangle; that
is verified when we consider the two lines of ochre text I've overlaid over
each of the top-aligned and bottom-aligned text.
Moreover, you'll note that the middle-aligned text does not actually have its x
character - the fundamental one for font metrics - cross the vertical middle at
its center. Even the capital-X doesn't cross the middle at its center. IIANM,
it seems that its the middle of the line+space-above vertical segment that
intersects the middle of the shape's height.
This is already problematic, in two ways:
1. It is not legitimate to assume that a single line of text has, or requires,
any inter-line spacing, at all. At least, this is not a legitimate assumption
in a textbox.
2. More importantly, even if we do assume line spacing - it cannot be assumed
to be located above the single line! If we assume each single line has it, then
surely, half of it must be above and half below. Or perhaps - the relative
placement should depend on the v-alignment, i.e. if we start from the top, then
v-space is below each line; if we start from the bottom - it is above; and if
we're valigned to the middle, then again half above and half below.
-----
Ok, so far we talked about the first slide. Things seemed to make sense and I
have an argument against the logic we're using. Now let's proceed to the next
slide, where the font is Carlito, having somewhat different metrics. Here -
nothing seems to make sense! The bottom-valigned text doesn't touch the bottom,
the top-valigned doesn't agree with the above line starting at the top of the
box, and I can't even guess what the middle v-alignment means exactly. The
logic seems beyond scrutiny. Could it be that the heights are calculated based
on metrics for another font? If not - what is it?
-----
No, why is all this an issue? Well, because every *** **** time I try to get
text to be on the bottom, or the top, of a textbox - I can't quite get it
there, and I need to either enter empty lines above or below, or play with
faux-subscripting/super-scripting. And it's even worse for middle v-align,
where the fact that the line is _not_ in the middle is even more apparent (the
top and bottom enjoy some benefit of the doubt due to margins which are
somewhat arbitrary). See also bug 163235 about middle v-alignment specifically.
--
You are receiving this mail because:
You are the assignee for the bug.