w3c / sealreq

Southeast Asian layout task force
34 stars 5 forks source link

How is inter-character spacing used in Thai? #16

Open r12a opened 6 years ago

r12a commented 6 years ago

Many scripts create emphasis or apply other effects by spacing out the letters or syllables in a word (known as tracking). It's also possible to stretch inter-character space during justification, either explicitly or during justification, as a way of relieving the stress on inter-word/phrase spaces.

CSS provides two properties that have the potential to produce inter-character spacing: a. the letter-spacing property b. text-justify:inter-character.

Please help us better understand how this CSS styling applies to and works (or doesn't) with Thai. Here are some questions to get us started:

  1. I believe that Thai content developers do apply tracking (ie. inter-character spacing) to text. Any comment on that?
  2. Does it ever make sense to apply text-justify:inter-character to Thai? See the description of this property in the CSS spec
  3. If extra gaps are introduced between characters, what are the indivisible text units? ie. presumably combining characters, even spacing ones, would normally not be separated from their base characters (but see 4)? Is a grapheme cluster (ie. base + combining characters) the relevant unit, or should gaps be introduced only around whole syllables?
  4. It appears that Thai does allow separation of base character and combining character in the case of ำ [U+0E33 THAI CHARACTER SARA AM]. In fact, this involves converting the vowel sign to U+0E4D THAI CHARACTER NIKHAHIT + U+0E32 THAI CHARACTER SARA AA, then introducing the gap between the [base+nikhahit] and the sara AA. Are there any further comments on this behaviour? Are there other character combinations that do something similar?
  5. Are there any other special things we need to bear in mind wrt adding gaps between characters in Thai, or other languages using the Thai script? Does inter-character spacing work in the same way in both tracking and justification scenarios, or are there differences?

I'll try to summarise the results of this discussion in the Thai gap-analysis document.

r12a commented 5 years ago

For a page that lets you experiment with letter-spacing in Thai on various browsers, see https://w3c.github.io/i18n-tests/css-text/letter-spacing-property/exp-th-letterspace-000.html

For related experimental tests, see https://w3c.github.io/i18n-tests/results/exploring-justify-space