Discussion:
Arabic fonts and line heights
Nathan Camillo Sidoli
2013-01-12 16:05:48 UTC
Permalink
This may not actually be a xetex question, but I suspect I may get a
useful answer here.

Is there someway I can more accurately control the line height when
using an Arabic font? When I use certain Arabic fonts, such as Amiri,
which stack a lot in certain situations, I get very mixed line heights.
The effect of this is that in entire pages of Arabic some lines are
bunched together and others are more spread out, while in pages where
Arabic words are quoted and phrases in generally English text the will
sometimes create large gaps between the lines. I can get rid of this
effect by correcting with something like scale=.8, but this makes the
Arabic text so small as to be almost unreadable.

Is there some way I can force the text to observe certain line heights,
or at least make them all the same on each individual page?

Thanks,

Nathan


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Zdenek Wagner
2013-01-12 21:46:32 UTC
Permalink
This may not actually be a xetex question, but I suspect I may get a useful
answer here.
Is there someway I can more accurately control the line height when using an
Arabic font? When I use certain Arabic fonts, such as Amiri, which stack a
lot in certain situations, I get very mixed line heights. The effect of this
is that in entire pages of Arabic some lines are bunched together and others
are more spread out, while in pages where Arabic words are quoted and
phrases in generally English text the will sometimes create large gaps
between the lines. I can get rid of this effect by correcting with something
like scale=.8, but this makes the Arabic text so small as to be almost
unreadable.
Is there some way I can force the text to observe certain line heights, or
at least make them all the same on each individual page?
This is a basic plai TeX question. The vertical list is composed so
that the distance of the baselines is equal to \baselineskip. However,
if the distance of the lower edge of the upper line from the top edge
of the lower line is less than \lineskiplimit, the lines are
positioned so that the distance between the bottom of the upper line
and the top of the lower line is equal to \lineskip. It happens in
Urdu where Nastaleeq style is used and for instance مجھے is
practically vertical.

You can play with these dimen registers. You have not written whether
you use plain XeTeX or XeLaTeX. In XeLaTeX some macros change the
values of these registers, you have to use the LaTeX way so that LaTeX
knows that you wish to use values other than the default.
Thanks,
Nathan
--------------------------------------------------
http://tug.org/mailman/listinfo/xetex
--
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org
Juan Acevedo
2013-01-13 12:15:09 UTC
Permalink
Dear Nathan,

The tricky decision is, as you point out: is it preferable to have mixed line heights or to have one large baselineskip for the entire document? In my experience with mixed Arabic and English there is no b/w solution (sadly for the ideal nice and regular grid layout we desire), and a compromise which pleases the eye tends to be the way to go.

To control the leading locally for entire paragraphs or pages I use the setspace package, which allows you to use the environment spacing with any measure you want.

If I have a mixed paragraph with Arabic scattered here and there, I would usually keep the Arabic in mboxes (something like \mbox{\RL{}} to make sure that the paragraph building introduces the necessary extra leading automatically, thus avoiding manual line breaks.

You may want to make sure that your document has \raggedbottom at the beginning, to prevent TeX's vertical stretching to creep in and mess with your leading.

I hope this helps,
Juan




--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Vafa Khalighi
2013-01-13 13:38:29 UTC
Permalink
Sure. This is a sample I wrote few years ago. It is not perfect but it should get you started:

http://www.parsilatex.com/joomla/attachments/article/178/autobaselineskip-example.tex


I am afraid that the macros are written in Persian.

Note: sorry for posting this twice. It seems that last time, I replied to the wrong question.

On Jan 13, 2013, at 03:05 AM, Nathan Camillo Sidoli <sidoli-***@public.gmane.org> wrote:

This may not actually be a xetex question, but I suspect I may get a
useful answer here.

Is there someway I can more accurately control the line height when
using an Arabic font? When I use certain Arabic fonts, such as Amiri,
which stack a lot in certain situations, I get very mixed line heights.
The effect of this is that in entire pages of Arabic some lines are
bunched together and others are more spread out, while in pages where
Arabic words are quoted and phrases in generally English text the will
sometimes create large gaps between the lines. I can get rid of this
effect by correcting with something like scale=.8, but this makes the
Arabic text so small as to be almost unreadable.

Is there some way I can force the text to observe certain line heights,
or at least make them all the same on each individual page?

Thanks,

Nathan


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex

Continue reading on narkive:
Loading...