[XeTeX] fontspec: problem with WordSpace feature
Firmicus
firmicus at ankabut.net
Wed Jul 19 18:05:03 CEST 2006
Hello everyone,
and a word of appreciation to Will Robertson for his wonderful fontspec
package.
In a LaTeX document I defined a \newfontinstance with the "WordSpace"
feature:
\newfontinstance\arabicfont[Script=Arabic,WordSpace=1.7]{Lotus Linotype}
(Yes, the interword space in this font is really too small).
Now since the command \arabicfont is called many times during processing
(esp. because of a macro that uses it for typing line numbers in Arabic
in the margin), it happens that the rescaling of fontdimen2 is done
again and again, growing exponentially until xetex complains that the
dimension is too large (probably larger that the page!) and stops.
Looking "under the hood" I realized that an additional "WordSpace=1.7"
is appended to the string of features of the font everytime the internal
fontspec macro is called, and the fondimen rescaling is done for every
one of them, again and again!
Needless to say, this is probably not the intended behaviour. I guess
saving the original fontdimen{2,3,4} of each loaded font and rescaling
against those original dimensions instead of the currently active values
would be the appropriate thing to do. What do you think?
NB: The problem can be circumvented by setting
\addfontfeature{WordSpace=1.7} immediately after the first occurence of
\arabicfont in the document, but I guess this is not a really clean
solution...
Thanks,
François
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20060719/8c5ee7b3/attachment.htm
More information about the XeTeX
mailing list