Difference between revisions of "How to prepare InDesign CS5, CS6 for Tibetan script"

From Digital Tibetan
Jump to: navigation, search
Line 23: Line 23:
  
 
====Script coding====
 
====Script coding====
 
+
The minimal requirement to enable Tibetan rendering is a script (here JavaScript) that enables the World-Ready composer in one paragraph style by:<ref>Thanks to Thomas Häny for the hint on language-independent resource-strings for the word-ready composer, following: http://www.indiscripts.com/post/2010/07/composer-en-arabe-sous-indesign-cs4</ref>
The minimal requirement to enable Tibetan rendering is a script (here JavaScript) that enables the World-Ready composer in one paragraph style by:
+
  
 
  var paragraphStyle = doc.paragraphStyles.item ("somestylename");  
 
  var paragraphStyle = doc.paragraphStyles.item ("somestylename");  
  paragraphStyle.composer = "Adobe World-Ready Paragraph Composer";
+
  paragraphStyle.composer = app.translateKeyString("$ID/HL Composer Optyca");
 
+
'''Note:''' When using the Chinese version of Adobe Indesign CS4 or CS5, the last line of the code-snip above needs to be changed to:
+
 
+
paragraphStyle.composer = "Adobe 全球適用段落視覺調整";
+
 
+
For more information on the Chinese version, see [http://www.atlaswu.com/blog/2010/10/22/%E5%A6%82%E4%BD%95%E5%9C%A8-adobe-indesign-cs5-%E4%B8%AD%E6%96%87%E7%89%88%E4%B8%AD%E7%B7%A8%E6%8E%92%E8%97%8F%E6%96%87/ AtlasWu's Observer].<ref>How to configure the Chinese Indesign version for Tibetan script at ''AtlasWu's Observer'': http://www.atlaswu.com/blog/2010/10/22/%E5%A6%82%E4%BD%95%E5%9C%A8-adobe-indesign-cs5-%E4%B8%AD%E6%96%87%E7%89%88%E4%B8%AD%E7%B7%A8%E6%8E%92%E8%97%8F%E6%96%87/</ref>
+
  
 
A complete script that creates a paragraph-style for the Tibetan font [[Tibetan Fonts#Jomolhari|Jomolhari]] would look like this:
 
A complete script that creates a paragraph-style for the Tibetan font [[Tibetan Fonts#Jomolhari|Jomolhari]] would look like this:
Line 39: Line 32:
 
''Tibetan.jsx'':
 
''Tibetan.jsx'':
 
<code>  
 
<code>  
createTibetanParagraphStyle (app.activeDocument, 'Tibetan');
+
  // localize the String for "Adobe World-Ready Paragraph Composer" :
function createTibetanParagraphStyle (doc, stylename)
+
  wrParagraphComposer = app.translateKeyString("$ID/HL Composer Optyca");
  {
+
 
  if (doc.paragraphStyles.item (stylename) == null)
+
  createTibetanParagraphStyle (app.activeDocument, 'Tibetan');
      doc.paragraphStyles.add ({name: stylename});
+
  function createTibetanParagraphStyle (doc, stylename)
  var paragraphStyle = doc.paragraphStyles.item (stylename);
+
  {
  paragraphStyle.composer = "Adobe World-Ready Paragraph Composer";
+
  if (doc.paragraphStyles.item (stylename) == null)
  try {
+
    doc.paragraphStyles.add ({name: stylename});
      tibFont = app.fonts.item("Jomolhari");
+
  var paragraphStyle = doc.paragraphStyles.item (stylename);
      paragraphStyle.appliedFont = tibFont;
+
  paragraphStyle.composer = wrParagraphComposer;
      }
+
  try {
  catch (myError) {};
+
      tibFont = app.fonts.item("Jomolhari");
  }  
+
      paragraphStyle.appliedFont = tibFont;
 +
      }
 +
  catch (myError) {};
 +
  }
 
</code>
 
</code>
  
Line 87: Line 83:
 
==References==
 
==References==
 
<references/>
 
<references/>
 +
* For more information on the Chinese version, see [http://www.atlaswu.com/blog/2010/10/22/%E5%A6%82%E4%BD%95%E5%9C%A8-adobe-indesign-cs5-%E4%B8%AD%E6%96%87%E7%89%88%E4%B8%AD%E7%B7%A8%E6%8E%92%E8%97%8F%E6%96%87/ AtlasWu's Observer].<ref>How to configure the Chinese Indesign version for Tibetan script at ''AtlasWu's Observer'': http://www.atlaswu.com/blog/2010/10/22/%E5%A6%82%E4%BD%95%E5%9C%A8-adobe-indesign-cs5-%E4%B8%AD%E6%96%87%E7%89%88%E4%B8%AD%E7%B7%A8%E6%8E%92%E8%97%8F%E6%96%87/</ref>
  
 
==Internal Links==
 
==Internal Links==

Revision as of 17:25, 2 July 2012

Introduction

InDesign CS6 for Mac OS-X supports two new composers called "World-Ready Composer" in flavours single-line and paragraph. Those composers correctly renders Tibetan Unicode fonts that work with Windows or Linux.

Unicode Tibetan pechas in Mac Adobe Indesign CS5


Restrictions

It seems that the current version (CS5 to CS6) of the Adobe World-Ready Composer does not handle correctly the OpenType element CCMP, which is used in a number of Tibetan fonts e.g. for handling of double vowel signs (like in oM, ཨོཾ). This is surprising, since the other composers do handle this correctly. So when using the World-Ready Composer with fonts that use CCMP, some glyphs might need to be fixed manually.

Compatibility and history

Note: the following information is only relevant for Indesign versions CS5.5 and below, no special scripting is required for Indesign CS6 for enabling the world-ready composers. While CS6 offers two World-ready composers (line and paragraph based), CS5.5 and below only offer one World-ready composer and require scripting code in order to activate it.

The World-ready composer was introduced with Adobe Indesign CS4, and enhanced in CS5.

Versions of Adobe Indesign CS3 and older do not support the World-Ready Composer and require external plug-ins for Tibetan support.

In order to get access to the World-ready composer" in CS4 and CS5 (up to CS5.5), a script is needed:

Installation

A script or a template needs to be installed in order to make the World-Ready composer accessible.

A very good overview and scripts for enabling Tibetan in Indesign CS4/CS5 is given by Thomas Phinney. The page also contains templates for Indesign, Illustrator and Photoshop.

Script coding

The minimal requirement to enable Tibetan rendering is a script (here JavaScript) that enables the World-Ready composer in one paragraph style by:[1]

var paragraphStyle = doc.paragraphStyles.item ("somestylename"); 
paragraphStyle.composer = app.translateKeyString("$ID/HL Composer Optyca");

A complete script that creates a paragraph-style for the Tibetan font Jomolhari would look like this:

Tibetan.jsx:

 // localize the String for "Adobe World-Ready Paragraph Composer" :
 wrParagraphComposer = app.translateKeyString("$ID/HL Composer Optyca");
 
 createTibetanParagraphStyle (app.activeDocument, 'Tibetan');
 function createTibetanParagraphStyle (doc, stylename)
 {
 if (doc.paragraphStyles.item (stylename) == null)
    doc.paragraphStyles.add ({name: stylename});
 var paragraphStyle = doc.paragraphStyles.item (stylename);
 paragraphStyle.composer = wrParagraphComposer;
 try {
     tibFont = app.fonts.item("Jomolhari");
     paragraphStyle.appliedFont = tibFont;
     }
 catch (myError) {};
 }

This script should be saved into a file named Tibetan.jsx and copied to

  • Windows XP: C:\Documents and Settings\<username>\Application Data\Adobe\InDesign\Version 7.0\<locale>\Scripts\Scripts Panel
  • Windows Vista: C:\Users\<username>\AppData\Roaming\Adobe\InDesign\Version 7.0\<locale>\Scripts\Scripts Panel
  • Mac OS: /Users/<username>/Library/Preferences/Adobe InDesign/Version 7.0/<locale>/Scripts/Scripts Panel

where <username> is your OS-X user name and <locale> references your location and language, for example, en_US.

Once the script is in the folder, it appears on the Scripts panel inside InDesign. To display the panel, choose Window > Utilities > Scripts. [2]

Double-click the script to create a paragraph style Tibetan.

Once a single style that uses the world-ready composer is defined, InDesign exposes the world-ready composer as option for all existing and new styles.

Configuration

[1] Indesign CS5 includes a World-Ready composer that supports Tibetan.

Once you have installed a script as described above, you can enable the World-Ready Composer for different paragraph styles:

  • Either define a new paragraph style, or edit an existing style (e.g. [Basic Paragraph])
  • Then set Paragraph Style Options / Justification / Composer to Adobe World-Ready Paragraph Composer. (See image [1]).

Any paragraph that has such a style assigned, correctly renders Tibetan Unicode.

The new composer supports all Windows/Linux Unicode Tibetan Fonts.


Notes

The techniques discussed here should also work with Adobe Illustrator and Adobe Photoshop.

References

  1. Thanks to Thomas Häny for the hint on language-independent resource-strings for the word-ready composer, following: http://www.indiscripts.com/post/2010/07/composer-en-arabe-sous-indesign-cs4
  2. See Indesign CS5 Scripting Tutorial, p.6

Internal Links

External Links

  • How to configure the Chinese Indesign version for Tibetan script at AtlasWu's Observer: http://www.atlaswu.com/blog/2010/10/22/%E5%A6%82%E4%BD%95%E5%9C%A8-adobe-indesign-cs5-%E4%B8%AD%E6%96%87%E7%89%88%E4%B8%AD%E7%B7%A8%E6%8E%92%E8%97%8F%E6%96%87/