September 4, 2000 - Using the Kashida Effect
September 4, 2000 Using the Kashida Effect Tips: September 2000
Yehuda Shiran, Ph.D.
|
auto
, distribute
, kashida
, and newspaper
values of the textJustify
property.
You can control the kashida effect by specifying the textKashidaSpace
property of the style
object. The kashida effect is measured in the ratio of kashida expansion to empty space expansion. When it is 100%, there is only kashida expansion. When it is 0%, there is only white space expansion. You can find out the kashida effect of an object in object.style.textKashidaSpace
. Here is how you specify the kashida effect:
object.style.textKashidaSpace = vKashida;
where vKashida
is one of two options:
percentage
. Integer, followed by a %. 100% is kashida expansion only; 0% is white space expansion only.inherit
. Text is expanded like the text in the parent object.
textKashidaSpace
property. Click one of the two links following the paragraph, and watch the kashida effect (early versions of IE 5.5 do not support it!):
Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line
100% kashida 0% kashida Here is how we defined the above paragraph and links:
<P ID="kashidaEffect" STYLE="text-kashida-space:100%; width:100%; text-align:justify; left:0">
Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line
Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line
Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line Long Line
Long Line Long Line Long Line Long Line Long Line Long Line
</P>
<A HREF="javascript:void(kashidaEffect.style.textKashidaSpace='100%')">100% kashida</A>
<A HREF="javascript:void(kashidaEffect.style.textKashidaSpace='0%\)">0% kashida</A>