• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Text Properties > text-script Property

10.11. text-script Property

The text-script property is to non-Western text what word-spacing is for Western-language text. Many Asian and Middle-Eastern styles of writing have their own ways of properly justifying text across a line. This may seem like a simple process, but compressing or stretching a line of characters so that they are justified across a full line (or column, for vertical text) can be a tricky thing when you consider that cursive scripts like Arabic join their individual “letters” together, or that some South-East Asian scripts, like Thai or Lao, do not leave spaces between words.

The text-script property has seven proposed values: auto (the default), inter-word, inter-ideograph, inter-cluster, kashida, newspaper and distribute. When the auto value is used, it is up to the browser to do what it thinks is best, which is essentially a trade-off between performance and the quality of the presentation. The inter-word value simply spreads the text evenly across the line by increasing the space between words. In a similar manner, the inter-ideograph value adds sufficient spacing between each individual Chinese, Japanese or Korean character. So if you used inter-ideograph on a line of mixed Chinese and English text, for example, you'd get even spacing between each Chinese character but no extra spacing between the individual letters making up the English words. The inter-cluster value works the same way as inter-ideograph, but is intended for use with South-East Asian scripts, like Khmer, Lao, Myanmar and Thai. Similarly, the kashida value works the same way as inter-ideograph, but is intended for Arabic text. The newspaper value is comprised of a sophisticated mix of the inter-word and inter-letter spacing. This value tells the browser to first try to compress letter spacing to ensure that words fit on a line, and if that doesn't work, expand the spaces between the words, and then increase the spacing in the letters between the words, if necessary. This is relatively processor-intensive, and when implemented should be used sparingly. This value would be most effective when arranging text in relatively narrow columns — much like what you see in most newspapers. The distribute value works in much the same way as newspaper, but it does not discriminate between letter and word spacing. If you used this value on a combination of Chinese and English text, you could expect to see even spacing between all characters, both Chinese and English. In addition to these values, there are also the ubiquitous initial and inherit values, the former likely to become common to all CSS3 properties (possibly all CSS properties) and the second and the latter common to the vast majority of CSS properties since the CSS2 specification. The initial value takes on whatever the default value for a property is, which in this case is auto, and the inherit value takes on whatever parent value may already be set for this property.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint