Re: [css-text] i18n-ISSUE-354: Questions about letter-spacing for Arabic script

On 08/17/2016 11:49 AM, John Hudson wrote:
>
> My two cents:
>
> There really need to be font level controls for 'letter-spacing' of Arabic text with which user agents can interact, because
> the methods of extending or contracting line length in Arabic are style- and design-specific. The issues involved in such
> 'letter-spacing' are, of course, directly analogous to those of justifying Arabic text, and would best make use of the same
> methods and technologies.
>
> It should be noted that kashidas (i.e. elongations between cursively joining letters) is only one in a hierarchy of methods
> traditionally used to widen Arabic text to a fixed measure, and is actually one of the lower priority methods, applied only
> after substitution of wider final and isolated forms, variant joining behaviours appropriate to the style, and adjustments to
> both inter- and intra-word spacing. The rules for where kashidas may be applied are also style specific, and not simply a
> binary between those styles that permit elongation and those that do not.
>
> A few years ago, Microsoft introduced a simple mechanism to prevent automatic kashida insertion from happening for a font
> during justification: if the font contains a zero-width, no-ink glyph for U+0640 ARABIC TATWEEL, MS Word and presumably MS
> browsers will not apply kashidas in justification. The purpose of this was to protect fonts that require curved or cascading
> kashidas and, hence, OpenType Layout GSUB and GPOS processing, from having kashidas inserted by justification algorithms after
> OTL has been processed. [Discretionary kashidas, inserted either by an author using U+0640 or by OTL contextual substitutions
> can still work in such fonts, but substituting an appropriate glyph in the GSUB table.] This mechanism is, to my knowledge,
> not properly documented and is currently external to any specification or standard.
>
> A more sophisticated option would involve support for the OpenType JSTF table or some update thereto. This would allow for
> design-specific prioritisation of multiple methods of adjusting Arabic text length to achieve the best results for the
> individual typeface.
>
> The end goal should be support even for curved and cascading kashida within a broader framework of prioritised expansion and
> contraction methods for Arabic text (meaning re-application of at least some aspects of GSUB and GPOS during justification or
> letter-spacing). Anything short of that is a technical compromise that may work for some specific styles of Arabic text
> (themselves the result of compromises with previous technologies dating back to hot-metal typesetting of the early 20th
> Century). Such compromises may be accepted as interim measures, but not as adequate solutions.

Well, I can't really fix any font things, since that's not my area. :)
But do have a look at what's written in
   https://drafts.csswg.org/css-text-3/#justify-cursive
and
   https://drafts.csswg.org/css-text-3/#cursive-tracking
and let me know if anything needs tweaking.

~fantasai

Received on Thursday, 18 August 2016 06:47:01 UTC