[texhax] Justification through glyph variants

Arno Trautmann Arno.Trautmann at gmx.de
Sat Dec 3 14:18:57 CET 2011


Joel C. Salomon wrote:
> In some older Hebrew books, and in Hebrew calligraphy, a technique used
> to align text to the outer margin is stretching letters.  Certain
> letters are particularly stretchable; in fact, Unicode has several "wide
> letters" encoded in the Alphabetic Presentation Forms area.
>
> For reference, compare:
>
>     א = ﬡ, ד = ﬢ, ה = ﬣ, כ = ﬤ, ל = ﬥ, ם = ﬦ, ר = ﬧ, ת = ﬨ.
>
> At any rate, is there any way to make (any version of) TeX use these to
> help justify lines?

I did a short hacking and produced some code that does:
• go through all lines after line breaking has finished
• if it has a positive glue (it is too short in natural), then:
• collect all possible substitutions
• randomly (!) insert a substitution, check the new linewidth
• repeat until the linewidth is too large
• the last line is not considered as it is not justified

If you can provide me with some information on hebrew typesetting, a 
suitable font, the character codes and maybe a full example, I could 
improve my test code (which only substitutes "n" by "m" which is rather 
pointless) to maybe fit your needs.

cheers
Arno


More information about the texhax mailing list