# RE: baseline problem

From: Allen Razdow <arazdow@mathsoft.com>
Date: Sun, 4 May 2003 23:14:43 -0400
Message-ID: <8D1EA20CE6AB1043956A27D60E468F1CABE602@distrib.mathsoft.com>
To: "'Doug Schepers'" <doug@schepers.cc>, dario <dario@inecco.net>

```
I think it's a question of knowing how much to shift, which may vary by
font, whether the particular string has ascenders, etc.

-Allen

-----Original Message-----
From: Doug Schepers [mailto:doug@schepers.cc]
Sent: Sunday, May 04, 2003 8:53 PM
To: dario
Cc: www-svg@w3.org
Subject: RE: baseline problem

Why not just use 'baseline-shift'? Am I missing something here?

<svg>
<line x1='5' y1='100' x2='695' y2='100' style='stroke:red;
stroke-width:1; fill:none; '/>
<text x='300' y='100' style='fill:black; text-anchor:middle;
font-size:16px;'>
<tspan style='baseline-shift:baseline;'>
baseline
</tspan>
<tspan style='baseline-shift:sub;'>
sub
</tspan>
<tspan style='baseline-shift:super;'>
super
</tspan>
<tspan style='baseline-shift:-33%;'>
percentage (-33%)
</tspan>
<tspan style='baseline-shift:3px;'>
length (3px)
</tspan>
<tspan style='baseline-shift:-80%;'>
Baseline-Shift (-80%)
</tspan>
</text>
</svg>

Hope that helps-
-Doug

Chris Lilley wrote:
>
>
> On Sunday, May 4, 2003, 10:49:09 PM, dario wrote:
>
> d> OK, what can i do to draw text under specified line
>
> d> so, there is line at 100 pixels from the top, i'd like text
> drawn just under
> d> it. is it possible?
>
> I understand the use case and no, not directly. You need to know what
> the text size is and then offset that much by yourself.
>
> <text x="100" y="62" font-size="12" text-anchor="middle">blah</text>
>
> --
>  Chris                            mailto:chris@w3.org
>
```
Received on Sunday, 4 May 2003 23:13:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:56 UTC