Thanks, this works fine.

Uwe

-----Ursprungligt meddelande-----
Fr�n: Henrik Holle [mailto:[EMAIL PROTECTED]]
Skickat: den 20 mars 2002 08:57
Till: [EMAIL PROTECTED]
�mne: AW: subscript, superscript


hmmmm,

look at LineArea.java !

public void verticalAlign() {
        int superHeight = -this.placementOffset;
        int maxHeight = this.allocationHeight;
        Enumeration e = children.elements();
        while (e.hasMoreElements()) {
            Box b = (Box)e.nextElement();
            if (b instanceof InlineArea) {
                InlineArea ia = (InlineArea)b;
                if (ia instanceof WordArea) {
                    ia.setYOffset(placementOffset);
                }
                if (ia.getHeight() > maxHeight) {
                    maxHeight = ia.getHeight();
                }
                int vert = ia.getVerticalAlign();
                if (vert == VerticalAlign.SUPER) {
                    int fh = fontState.getAscender();
                  //superscript
                        ia.setYOffset((int)(placementOffset - (2 * fh /
4.85)));
                } else if (vert == VerticalAlign.SUB) {
                    int fh = fontState.getAscender();
                    //subscript
                    ia.setYOffset((int)(placementOffset + (2 * fh / 4.85)));
                }
            } else {}
        }
        // adjust the height of this line to the
        // resulting alignment height.
        this.allocationHeight = maxHeight;
    }



-----Urspr�ngliche Nachricht-----
Von: Klosa Uwe [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 20. M�rz 2002 08:27
An: '[EMAIL PROTECTED]'
Betreff: SV: subscript, superscript


Etwin,

I'm using <fo:inline vertical-align="super"> and <fo:inline
vertical-align="sub">, but the results aren't good.
Subscript places the text too low och superscript too high.

Uwe



-----Ursprungligt meddelande-----
Fr�n: Etwin van Krimpen [mailto:[EMAIL PROTECTED]]
Skickat: den 19 mars 2002 16:45
Till: [EMAIL PROTECTED]
�mne: Re: subscript, superscript


Hi,

Try this with fop, in a previous version it worked:

<fo:inline vertical-align="super">

Regards, Etwin

----- Original Message -----
From: "Klosa Uwe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 4:36 PM
Subject: SV: subscript, superscript


> Hi Henrik,
>
> I've got the same problem and I asked for this several times here. But I
> didn't get an answer.
> The recommendation says, that you have to use baseline-shift="super" or
> baseline-shift="sub".
> But this isn't implemented yet and I find now no time to do it. Perhaps is
> there someone else
> who needs this parameter, too.
> If you want to implemented baseline-shift, might it be an good idea.
>
> Best regards
>
> Uwe
>
> -----Ursprungligt meddelande-----
> Fran: Henrik Holle [mailto:[EMAIL PROTECTED]]
> Skickat: den 19 mars 2002 14:14
> Till: [EMAIL PROTECTED]
> Amne: subscript, superscript
>
>
> hi,
>
> can someone help me where to find the settings for subscript and
superscript
> in the fop-0.20.3 sourcecode?
>
> I have especially trouble using subscript as it places text too low for my
> application requirements.
>
> regards
>
> Henrik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to