vertical text alignment

Post questions on how to use or achieve an effect in Inkscape.
bene
Posts: 3
Joined: Sun Aug 05, 2012 6:46 pm

vertical text alignment

Postby bene » Sun Aug 05, 2012 6:54 pm

Hi,

I just started to use Inkscape because of the nice Latex-export. It is much easier than using pure tikz, which I formerly did.

I have only one problem and that is vertical text alignment. In Inkscape, that can be done with "Align and Distribute". But for the latex export the text anchor is of importance which remains at the baseline. Is it possible to move this to the cap-height or to the x-height for top or middle alignment? I have already seen svg-pictures where this anchor was not placed at the baseline, so it should be technically possible.

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: vertical text alignment

Postby chriswww » Mon Aug 06, 2012 9:40 am

fonts are designed to anchor to baseline, with offset if needed, for example in non-lining figures. you can select the text or individual letters and move up or down one pixel at a time by holding down alt key and use up/down arrow keys. but afaik there's no such thing as text anchoring to say x-height....it would mean the designer of the font would need to create all those correct anchor points for each letter.
If you convert the text to objects and select all the small letters, you could align to top with align and distribute..and then treat the caps separately. but it's bound to look wonky, as x-height is almost never exactly where lowercase letters finish.

bene
Posts: 3
Joined: Sun Aug 05, 2012 6:46 pm

Re: vertical text alignment

Postby bene » Mon Aug 06, 2012 5:24 pm

For my usage I would actually not need baseline/cap-heigth/... -aligning but just simple top/center/bottom. I just thought I recognize this feature from other programs. In some technical sketches I'm doing I need this. I cannot move the text because I'm exporting the picture to pdf/latex so my Tex-processor is typesetting the texts. Therefore I can also not convert text to objects, the Tex-processor would not recognize the text anymore.

I just had a look and other programs like Illustrator and Corel Draw have this feature that's why I thought, it must be possible with Inkscape as well.

bene
Posts: 3
Joined: Sun Aug 05, 2012 6:46 pm

Re: vertical text alignment

Postby bene » Mon Aug 06, 2012 5:34 pm

I really have hardly any knowledge of the internals of svg. But I found the following page from which I would think it should be possible: http://www.w3.org/1999/07/30/WD-SVG-19990730/text.html

'vertical-align'
Value: baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> | <<length> | inherit
Initial: baseline
Applies to: inline-level and 'table-cell' elements
Inherited: no
Percentages: refer to the 'line-height' of the element itself
Media: visual


Return to “Help with using Inkscape”