Forum Feature requests

Contextual swash

jim_albright
I'm just learning the vocabulary needed to express requirements for rtl typesetting.

A contextual swash is usually added word/line initial/final. It helps fill line for justification. Do you support that already? It looks to me like it is handled with glyph substitution.

http://www.microsoft.com/typography/otfntdev/arabicot/features.aspx

I know I need the above. Don't know if I need the following yet:

Cursive positioning. Where the end of one letter joins the start of the next letter.

Kerning.

Jim Albright
Wycliffe Bible Translators

mikeday
Kerning is supported, and so are Arabic shaping rules (initial, medial, and final forms of glyphs). Contextual positioning is supported, but few fonts use it; we've only seen a couple of Urdu fonts that do. We don't yet handle Arabic-specific justification with kashidas.
jim_albright
How about the contextual swash?

Jim Albright
Wycliffe Bible Translators

mikeday
The 'cswh' and 'swsh' features are not applied by default, as they can require the user to interactively select the desired swash variant, eg. from a list of possibilities.
jim_albright
Is this something that I should add to Princess to select the swash.

This feature should be inactive by default. When more than one GID is returned, an application could display the forms sequentially in context, or present a palette showing all the forms at once, or give the user a choice between these approaches. The application may assume that the first glyph in a set is the preferred form, so the font developer should order them accordingly.
http://partners.adobe.com/public/developer/opentype/index_tag8.html

Do you know of any applications that do this?

Jim Albright
Wycliffe Bible Translators

mikeday
Adobe InDesign and Illustrator support features like this. Doing it from an external application could be tricky though, as you would need to actually load the font and display the glyphs. It's verging on creating a new desktop publishing suite, which would be great, but not a minor undertaking. :)
jim_albright
Is there anything in CSS that facilitates swsh and cswh? Like a switch to turn on and preferred one to pick?

Jim Albright
Wycliffe Bible Translators

mikeday
You can use "font-variant: prince-opentype(cswh)" to enable the contextual swash feature, but this does require some knowledge of the font you are using. I don't think web browsers currently support either the swsh or cswh features.
jim_albright
I am only interested in generating high quality PDF.

Would this work? Select a line of text
xxx yyyyy zzz,
copy to clipboard, then find line in XML and change line to
<span class="cswh">x</span>xx yyyyy zz<span class="cswh">z</span>

In CSS have

.cswh {font-variant: prince-opentype(cswh)}

Process through Prince again. Will that add the desired swashes to the first and last letters of the line?

Jim Albright
Wycliffe Bible Translators

mikeday
That should work if the font supports the cswh OpenType feature; testing manually first would be a good idea.