Loading ...
Sorry, an error occurred while loading the content.

determine length of word

Expand Messages
  • Janning Vygen
    Hi, i am new to FO and new to this list. Hope my question fits into this list. I am actually working with the trial version of XEP. I want to write the return
    Message 1 of 1 , Jan 9, 2003
    • 0 Attachment
      Hi,

      i am new to FO and new to this list. Hope my question fits into this
      list.

      I am actually working with the trial version of XEP.

      I want to write the "return addressee line" at a specific place in a
      letter to make it visible through a window of a standard envelope.
      This is very usual in germany. So i dont know if it is usual anywhere
      else. You have 8.5 cm where you can place your address to ensure the
      letter will come back if it doenst reach the recipient. (like a
      return-path header)

      Now i want to use a smaller text font if the line is
      too large to fit in line.

      simple example

      <letter>
      <from>
      <name>Janning Vygen</name>
      <address>Herzogstrasse 85</address>
      <city>40215 Duesseldorf</city>
      </from>
      <to>
      ...
      </to>
      <body>
      ...
      </body>
      </letter>

      this should become one line
      "Janning Vygen, Herzogstrasse 85, 40215 Duesseldorf" which fits in
      the given range.

      Is there any way to set the variable font-size
      or letter-spacing to let the line fit in the given 8.5 cm?
      Soemthing like:

      a use 11pt Times as standard
      b if line doesnt fit first reduce letter-spacing by 0.01cm
      c if still doenst fit reduce font size by 1 pt
      d return step b and c untill it fits

      In XEP: if you say the line should be justified, XEP renders it to
      fit by reducing the letter spacing. But this doenst look very nice if
      it is much too long. It would be nicer to reduce the font-size.

      I didnt find a way to do something liek this in FO and it looks like
      that FO isnt the right tool to realize it. Maybe I have to make these
      decision in XSLT and have to calculate the font metrics inside XSLT
      and decide which font to use.

      But before running into doing complicated stuff like font metric
      calculation in XSLT i better ask, which i have done with this
      mailing.

      any help is very appreciated

      kind regards
      Janning

      -----------------------
      PLANWERK 6
      websolutions

      Herzogstra├če 85
      40215 D├╝sseldorf

      fon 0211 - 601 606 93
      fax 0211 - 601 591 7

      vygen@...
      http://www.planwerk6.de
      -----------------------
    Your message has been successfully submitted and would be delivered to recipients shortly.