right alignment is not correct with some fonts

hello list!

first of all, i am using Apache FOP.


what i want to do is the following:
i have two texts which are positioned within a block. the
block-containers the blocks live in have exactly the same coordinates
except "top".. both texts have text-align="right", so the texts should
exactly be placed one below the other with the same right border.

here is the code i used to achieve this;


  <fo:block-container position="absolute" left="20.0mm" top="16.0mm"
width="30mm" height="55mm">
    <fo:block font-family="Arial" font-size="2.0mm" text-align="right"
font-weight="normal">
      <xsl:text>TeTeTeTe</xsl:text>
    </fo:block>
  </fo:block-container>

  <fo:block-container position="absolute" left="20.0mm" top="14.0mm"
width="30mm" height="55mm">
    <fo:block font-family="Arial" font-size="2.0mm" text-align="right"
font-weight="normal">
      <xsl:text>The</xsl:text>
    </fo:block>
  </fo:block-container>



the problem no is, the the texts do not have the same right border! it
seams as if the 'e' of "Te" gets moved "under" the 'T'. so the text "Te"
is more right (but still too much on the left side compared to the text
"The") than the text "TeTeTeTe".

I saw the same wrong behaviour with "Fr", "Ti" and "Ir", but i'm sure
the list is not complete.


The same code with font-family="Times" works as expected, so the problem
is font depended.


can anyone explain this or even provide a "workaround" for this problem?

thank you,

Patrick Buchinger

Received on Tuesday, 2 November 2004 12:38:29 UTC