determine length of word
i am new to FO and new to this list. Hope my question fits into this
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
Now i want to use a smaller text font if the line is
too large to fit in line.
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?
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
any help is very appreciated
fon 0211 - 601 606 93
fax 0211 - 601 591 7