Issue 74715 - Text Box should offer more alignment options
Summary: Text Box should offer more alignment options
Status: CONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: formatting (show other issues)
Version: OOo 3.1
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-21 05:36 UTC by irneb
Modified: 2013-02-07 22:35 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Sample to show problem (176.78 KB, image/png)
2009-08-15 11:18 UTC, irneb
no flags Details
logical bounds of Arial's 'r' and 'T' (2.82 KB, image/png)
2009-08-18 09:15 UTC, hdu@apache.org
no flags Details
Example Draw file (10.17 KB, application/vnd.oasis.opendocument.graphics)
2009-08-18 11:15 UTC, irneb
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description irneb 2007-02-21 05:36:58 UTC
Many of the more profesional page layout apps provide alignment options to edges
of the actual text in a text box. In Draw I've found that even after setting the
text to fit frame & make all margins 0, the text still has a gap from the
surrounding box (even if this box doesn't show).

Well, most other progs (Corel Draw, Illustrator, Scribus, etc.) also has this
"defect", but they've got a solution: You can align text to another object by
choosing to align the actual text's edges, not the box's.

For example, say you have a rectangle with some text below, you need to align
the left edge of the text to the left edge of the rectangle. With Draw the text
will always be slightly to the right of where it should be - unless you
fine-tune the position manually (which is a pain).
Comment 1 wolframgarten 2007-02-26 08:45:53 UTC
Reassigned. 
Comment 2 irneb 2009-08-15 11:18:51 UTC
Created attachment 64181 [details]
Sample to show problem
Comment 3 irneb 2009-08-15 11:25:19 UTC
Created a sample to show the problem. Each of the texts has a spacing to borders
set to 0.00cm and then aligned to the rectangle below. The 2 lines below that is
split into 2 text objects since the "space" next to each character varies
between characters. This is not the case in other programs (e.g. Scribus) which
aligns the actual character to the specified side of the text box. So an align
of a multi-line text box aligns all the characters correctly.

BTW, the sample was done in OOo Draw 3.0 so it's still a problem.
Comment 4 hdu@apache.org 2009-08-17 15:51:35 UTC
Looks like text boxes are only formatted for the logical extents of the text. Add the option to use the ink 
bounding boxes instead sounds like a good idea.
Comment 5 irneb 2009-08-17 16:13:42 UTC
It's actually even worse than just aligning to the ink boundary. Since multiple
lined paragraphs don't even align with each consecutive line.

See the example I've attached. The 2 top lines are inside one text box. As
you'll note the capital T is much closer to the alignment edge than the next
line's lowercase r. The bottom 2 lines I had to split into 2 separate text boxes
and align then individually. The T and c's differences are even more pronounced
then T & r.

That's why I think this may be dependent on Issue 3243, at least if a version of
Optical Letter Kerning is used there.

Comment 6 hdu@apache.org 2009-08-18 09:15:43 UTC
Created attachment 64230 [details]
logical bounds of Arial's 'r' and 'T'
Comment 7 hdu@apache.org 2009-08-18 09:22:50 UTC
> you'll note the capital T is much closer to the alignment edge than the next line's lowercase r

This is intended so by the font designer. See my screenshot above: the left-side-bearing of 'r' is 133, of 
'T' it is only 48, i.e. it is about three times closer to the logical bound, which is exactly what you see in 
your screenshot.
Comment 8 irneb 2009-08-18 10:47:32 UTC
> This is intended so by the font designer.
Which is fine (I suppose) when there's 2 characters next to each other. But
where I find it really irritating is at present I'm creating a email signature
with logo & disclaimer at the bottom. I'm trying to line-up the disclaimer
paragraph with the left edge of logo. While with some fiddling I can align most
of the text lines with the logo, the text actually does not look aligned to
left. It appears as if I indented by using spaces instead of a tab (like you
find a non PC literate typist would do), while it's not even indented at all.
Comment 9 irneb 2009-08-18 11:15:36 UTC
Created attachment 64233 [details]
Example Draw file
Comment 10 irneb 2009-08-18 11:53:57 UTC
I've just attached an ODG file with the problem shown. I've tried adjusting the
text paragraph by moving it -0.01cm (absolute minimum which has any effect)
after aligning with the rectangle.

As you can see some of the text now passes to the left of the rectangle, while
others are still to the right of the edge.
Comment 11 hdu@apache.org 2009-08-18 13:59:04 UTC
This confirms that OOo's textbox should get additional alignment options. Currently left-alignment 
always means alignment of the text origin (see http://www.myfirstfont.com/glossary.html for a nice 
overview of the difference between logical bounds and ink bounds). So the technical background of this 
issue has been clarified and the open questions in this issue about new options, best defaults, 
intuitiveness of user-interactions, etc. are already correctly assigned to "requirements".
Comment 12 irneb 2009-08-19 11:24:21 UTC
IOW what should happen is to align with the left / right side of the text, minus
the sidebearing of the character. I've just tried this in Scribus, it has an
option for aligning text to the box sides using an "optical alignment" ... which
seems to accomplish this task.