Sunday, 31 December 2006

More about Phags-pa Seal Script

As I mentioned recently, the rhyming dictionary Menggu Ziyun 蒙古字韻 provides a list of seal script forms of Phags-pa letters. As this is the only source of information about Phags-pa seal script letters other than actual Yuan dynasty seals it is obviously a very important resource. However, the table of letters is quite confusing, and so this is my attempt to make some sense of it all.


Source : Exact facsimile transcription of Menggu Ziyun in Luo Changpei 羅常培 and Cai Meibiao 蔡美彪, Basibazi yu Yuandai Hanyu 八思巴字與元代漢語 (Beijing: Kexue Chubanshe, 1959) -- for those interested a revised edition of this important work was published in 2004.


The first problem with this table is the order of the letters in it. It is clear that the table is written in vertical columns running from left to right, and that for each Phags-pa letter the normal book form is given followed by one or more seal script forms (if the seal script form differs from the book form), but there appears to be no rhyme or reason to the order, which goes GA , BA , ZA , KHA , PHA , JA , etc. It is only when you look on the preceding page at the table of initial letters that entries in Menggu Ziyun are ordered by within each rhyme category that it is possible to understand the ordering.



The table of initials is ordered according to the traditional "thirty-six initials", laid out horizontally in three rows starting from GA , KHA , KA , NGA at the left of the top row and ending with LA , ZHA at the right of the bottom row, and with vowels I, U, E, O, EE and semivowels W and Y in a vertical column on the far right. However, the person who wrote the table of seal script form letters has misunderstood the table of initials as reading in columns running from left to right, with the result that the table of seal script letters is completely misordered as GA (first letter in top row), BA (first letter in middle row), ZA (first letter in bottom row), KHA (second letter in top row), PHA (second letter in middle row), JA (second letter in bottom row), etc.

The table below rearranges the original table of letters, with each group of letter forms on a separate row. Note that the ordinary Phags-pa letters are displayed with the "BabelStone Phags-pa Book" font and the seal script letters with the "BabelStone Phags-pa Seal" font, which you must install to see anything. The "BabelStone Phags-pa Seal" font contains all the seal script forms given in Menggu Ziyun, but some obviously misformed glyphs (e.g. the unjoined stroke on the third seal script form of the letter BA) have been silently corrected. The column labelled "Position" is the sequential position of the letters in the original table, counting from "1" in the top left column in vertical columns from left to right. The column labelled "Number" is the number of the letter in the list of thirty-six initials (see Table 2), which would be the expected ordering of the letters if they were not inadvertently misordered.


Position Number Letter Book Form Seal Script Forms Notes
1-4 1 GA     
5-8 13 BA    The book form is closer to the letter PHA.
9-10 25 ZA  
11-12 2 KHA  
13-14 14 PHA The book form looks more like the letter BA.
15-16 26 JA  
17-18 3 KA The book form is written oddly.
19-20 15 PA  
21-22 27 CHA  
23-24 4 NGA  
25-26 16 MA The book form is missing the final stroke.
27-28 28 CA  
29 5 DA   No seal script form of the letter is given, and the form of the letter DA in extant seals is indeed the same as the book form ().
30-31 17 FA1  
32-33 29 SHA1  
34-35 6 THA  
36-37 18 FA2 The book form does not show the extra kink that the second form of FA has in the Table of Initials.
38-39 30 SHA2  
40-42 7 TA    
43-44 19 FA3  
45-46 31 HA1  
47-50 8 NA     
51-52 20 WA  
53-54 32 XA  
55-56 32a HA2  
57 9 JA   No seal script form of this letter is given. Any seal script form would be expected to be the same as for Initial 36.
58-59 21 DZA  
60-61 33 -A  
62-64 33a YA1   The book form is wrongly written as the second YA letterform [U+A86D], but the first YA letterform [U+A857] would be expected here.
65-66 10 CHA  
67-68 22 TSHA  
69-72 34 'A     
[73-76] 34a YA2   This letter is missing from the original table.
[77-78] 11 CA   This letter is missing from the original table.
[79-80] 23 TSA   This letter is missing from the original table.
81-83 35 LA    
84-85 12 NYA  
86-88 24 SA    
89-91 36 ZHA    
92-93   I  
94-95   U  
96-97   E As far as I can tell the seal script form is not normally written like this, but as or .
98-100   O   The two seal script forms are the isolate and initial forms of the letter.
101   EE   The book form is misformed, and no special seal script form is given. In extant seals the letters EE and Subjoined Ya are virtually identical.
102   Subjoined Wa   No special seal script form is given. In extant seals it is written as .
103   Subjoined Ya   The book form is misformed, and no special seal script form is given. In extant seals it is written as .
104   QA ?   It is not clear what this letter is. I am guessing it is a misformed letter QA, used for Mongolian but not Chinese, and so not in the Table of Initials in Menggu Ziyun. No seal script form is given, but it would be expected that the seal script form of the letter QA was a mirror form of the letter QA, i.e. .
105-106   GGA ? The letter GGA is not used for Chinese (or Mongolian or Uighur), and so is not in the Table of Initials in Menggu Ziyun.

As I may have mentioned before, there is only one extant copy of Menggu Ziyun, and that is an 18th century manuscript copy (itself probably a copy of a copy of a 14th century printed edition), and it has many corruptions and misformed letters. It is therefore not surprising that many of the letters, both book form and seal script form, in the table of seal script letters are misformed. In most cases this does not matter too much as the correct form can be deduced from context, but the table shows one example of textual corruption that cannot be repaired. That is, there appears to be a column of eight letters missing (between what are the 9th and 10th columns from the left in the extant manuscript), which would have given the seal script forms for the letters YA (2nd form) , CA and TSA . In the table above the positional numbering has been adjusted to take into account this missing column (positions 73-80).

One interesting feature of the table that needs to be mentioned is that it gives different seal script forms for letters that occur more than once in the Table of Initials :


No. Letter Book Form Seal Script Form
10 CHA
27 CHA
17 FA1
18 FA2
19 FA3
31 HA1
32a HA2
29 SHA1
30 SHA2

In the case of the letters YA, SHA, HA and FA, this distinction is also shown in the book forms of the letters in Menggu Ziyun, and these variant forms are represented in the encoding (U+A85A vs U+A86E, etc.), although only two forms of the letter FA are encoded, and the table of seal script forms has distinct seal script forms for each of the three FA initials (17, 18 and 19). In the case of the two CHA initials (10 and 27), the book forms of the letters are not distinguished in Menggu Ziyun, and I suspect that the assignment of different seal script forms to the two CHA initials was an arbitrary decision by the author of the table, and probably does not reflect actual practice in Phags-pa seals. Indeed, I am quite doubtful that any of the seal script distinctions between letters that occur multiple times in the table of seal script forms are reflected in extant seals; but further research will be required to confirm or deny this.


Saturday, 30 December 2006

Christmas Presents

Except for that I have been hiccupping continuously since Boxing Day, this year has been a good Christmas for me, with two marvellous additions to my library from a couple of very generous friends of mine.



A Tangut Dictionary

From Michael Everson I received a copy of Wenhai Yanjiu 文海研究 (Zhongguo Shehui Kexue Chubanshe, 1983), which is a study of the mid 12th century monoglot Tangut Rhyming dictionary, "The Sea of Characters" 文海, by Shi Jinbo 史金波, Bai Bin 白濱 and Huang Zhenhua 黃振華. The book includes a facsimile of the original woodblock edition (found in 1908 at the site of the Tangut city of Kharakhoto 黑水城), together with a beautifully rewritten facsimile transcription, as well as a translation into Chinese, and a character index. This is a very timely present as Tangut is soon going to be high on the script encoding agenda, and is something that I want to focus my attention on in the new year.




A Collection of Yuan Dynasty Seals

And in the post this morning I received from Vladimir Belyaev, the proprietor of the excellent Zeno Oriental Coins Database, a copy of Yuandai Yinfeng 元代印風 (Chongqing Chubanshe, 1999), which is a collection of seal impressions from the Yuan dynasty (1271-1368).

My main interest is in the many Phags-pa seals in the book, including no less than thirty-eight official seals, which I am planning to study carefully in order to improve my Phags-pa Seal font. The following example is the seal of the Imperial Preceptor and Commissioner of Buddhist Affairs 通領釋教大元國師 ꡉꡟꡃ ꡙꡞꡃ ꡚꡞ ꡂꡨꡓ ꡈꡗ ꡝꡧꡦꡋ ꡂꡟꡠ ꡚꡜꡞ, a title that was first bestowed on the great Phags-pa Lama (the creator of the Phags-pa script), although this seal may belong to one of his successors.



In addition to the official seals, the book also includes dozens of "signature seals" 押印 with either a Phags-pa inscription or a combined Chinese and Phags-pa inscription. The following examples from one page of the book show signature seals with a Chinese family name in Chinese script (Li 李, Chu 褚, Xing 邢, Ma 馬, Zhu 朱, Zeng 曾, Qian 錢 and Feng 馮) followed by the word gi ꡂꡞ in Phags-pa script, representing Chinese ji 記 "mark". The seal in the centre is different from the others, as it has a Chinese family name, Shi 石 followed by the Phags-pa spelling of the name, shi ꡚꡞ.



Friday, 29 December 2006

Phags-pa Fonts 3 : BabelStone Phags-pa Seal

The final Phags-pa font that I am releasing for the time being is BabelStone Phags-pa Seal, which is a "seal script" style font that can be downloaded from here. This has been a very difficult font to implement, and I am not terribly satisfied with the results, but rather than labouring on it any further I will release it now and maybe work some more on it at some future date.

As with other scripts of this period that were constructed for writing non-Chinese languages (e.g. Tangut and Khitan), Phags-pa has a special pseudo-archaic "seal script" style of lettering that imitates the often convoluted forms of Chinese characters that are used on Chinese seals. This form of Phags-pa lettering is almost exclusively restricted to use on seals (mostly official seals from the Yuan dynasty), although it is also used for the title (碑額) on some Yuan dynasty monumental inscriptions.



The biggest problem with trying to implement a seal script style of font (whether for Chinese, Tangut, Khitan or Phags-pa) is that there is a wide range of stylistic variation in glyph shapes for seal script characters as the exact shape or any particular character may depend upon the space available to it in the fixed area of the seal surface. To fill in space the seal engraver may add in extra folds to a character, or simplify the form of a character when there is less room available; in Phags-pa seals this is particularly evident in the letters for the vowels "i" and "u" which expand and contract in complexity according to the constraints of space.

Thus my Phags-pa seal script font has multiple variants of most characters, with some characters having up to twelve glyph variants. The variants selected for inclusion in the font are based on examples of Yuan dynasty seals (and seal impressions) that I have come across as well as the list of seal script forms of Phags-pa letters given in Menggu Ziyun 蒙古字韻 (which I will discuss further another day). It has been difficult to decide which glyph form to use as the basic glyph of each character in the CMAP, but in the end I decided to go for the more ornate glyph forms even when simpler glyphs may be more commonly encountered for a particular character.

The next question was how to make the alternate glyph forms of each character available to the user. I have tried to solve this in two ways. Firstly I have implemented the Stylistic Alternates <salt> feature in the OpenType tables, but as I don't know of any application that actually allows users to select glyph alternates by means of this feature I have double-mapped all the Phags-pa glyphs in the font to the PUA at U+F000 through U+F36F so that users can construct any sequence of glyph forms they like (with judicious use of the joiner characters at U+F360 through U+F36F). Any feedback from users on accessing the stylistic alternates feature would be most welcome (I'm far from certain that this is the correct OpenType feature to use or that I and/or VOLT have implemented it correctly).

The following is an example of a Yuan dynasty seal (沿海巡防千戶之印), and below it the corresponding text input as Phags-pa codepoints (using the default glyphs); and below that the same text input as PUA characters selecting the closest glyph form available in the font.





Sunday, 24 December 2006

Phags-pa Fonts 2 : BabelStone Phags-pa Tibetan

I have now released two Tibetan style Phags-pa fonts, unimaginatively named "BabelStone Phags-pa Tibetan A" and "BabelStone Phags-pa Tibetan B", which may be downloaded from here.


BabelStone Phags-pa Tibetan A


BabelStone Phags-pa Tibetan B


These fonts are both modelled on Phags-pa script primers such as the example below (with Lantsa, Tibetan, Mongolian, Chinese and Cyrillic) obtained by a Buriat Cossack officer, Tsokto Garmeyevich Badmazhapov, in 1903. The only difference between the two fonts is that the letters THA [U+A849], MA [U+A84F], TSHA [U+A851], DZA [U+A852], WA [U+A853], ZHA [U+A854], SHA [U+A85A] and Subjoined RA [U+A871] have slightly different letterforms.


Source : Nicholas Poppe, The Mongolian Monuments in ḤP'AGS-PA Script (Otto Harrassowitz, 1957) page 16.


The Tibetan style of Phags-pa script, known in Tibetan as hor-yig gsar-pa ཧོར་ཡིག་གསར་པ་ "New Mongolian letters" is a distinctive style of the Phags-pa script that is used to a limited extent in Tibet and Mongolia as a decorative script for engraving seals, inscribing book titles on the covers of traditional pecha books, and for architectural inscriptions such as those found on temple columns and doorways. However, the script is not used for writing texts.



The Tibetan style of Phags-pa script is squarer and more compact than the original script used during the Yuan dynasty, but like its predecessor it is still written in vertical columns running from left to right. Some consider this to be a separate script, distinct from the Yuan dynasty Phags-pa script, but I do not subscribe to this point of view as the only significant difference between modern Tibetan Phags-pa script and Yuan dynasty Phags-pa script is the stylization of the letterforms. In fact, the same compact, square letterforms can already be seen in some Yuan dynasty inscriptions, such as this title inscription (碑額) on a monument dated 1289, where some letters are identical to Tibetan style Phags-pa letters, whilst other letters use more typical seal script forms.


重修崇慶院之記


And for comparison, here is the same inscription as written in typical Tibetan style Phags-pa letters (BabelStone Phags-pa B). Notice in particular how the letters A and NA in the word 'wen (院) halfway down the second column are identical to the forms used in the 1289 inscription.



It is clear from this example that the Tibetan style of Phags-pa evolved from the seal script form of Phags-pa that was often used for the title inscriptions of monuments in the Yuan dynasty. However, it was not until two hundred years after the fall of the Yuan dynasty that the Tibetan style of Phags-pa achieved its modern form. The earliest attested use of this style of Phags-pa script is on a golden seal that is recorded to have been given to the third Dalai Lama by Altan Khan (1507-1582) in 1578; although the original seal is now lost or destroyed, examples of imprints from seals with the same Phags-pa text are known from documents dating from 1648 and later. In 1982 a stone pillar was unearthed near Hohhot that has an inscription in Sanskrit and Mongolian, with a Phags-pa inscription on either side that records that the pillar was errected in 1580 by a grandson of Altan Khan. The style of lettering in this Phags-pa inscription is very similar to the Tibetan style Phags-pa script found in Tibetan seals and seal imprints. The close date of this stone pillar to the date of the seal of the third Dalai Lama suggests that the Tibetan style of the Phags-pa script achieved its distinctive form in Mongolia during the reign of Altan Khan (1543-1582).

Finally, here are a couple of examples of contemporary Tibetan Phags-pa calligraphy, with thanks to Chris Fynn for the scans.


Tibetan Calligraphy by Kun-dga' Rin-chen ཀུན་དགའ་རིན་ཆེན

Source : Bod-kyi Yi-ge'i gZugs Ris བོད་ཀྱི་ཡི་གེའི་གཟུགས་རིས (Lhasa: Tibet People's Publishing House, 1999) page 44.


Tibetan Calligraphy by Tshe-tan Zhabs-drung ཚེ་ཏན་ཞབས་དྲུང

Source : Gangs-can mKhas-pa'i Phyag-bris sNa-tshogs Phyogs-bsdus Rin-chen Phreng-ba གངས་ཅན་མཁས་པའི་ཕྱག་བྲིས་སྣ་ཚོགས་ཕྱོགས་བསྡུས་རིན་ཆེན་ཕྲེང་བ (Lanzhou: Gansu People's Publishing House, 1990) p.170.


Saturday, 23 December 2006

Phags-pa Alternate Letters YA, SHA, HA and FA

After having discussed the basics of Phags-pa Shaping Behaviour, I thought it would be a good idea to discuss one final piece of essential Phags-pa knowledge before moving on to other things in the new year. That is, the four "alternate" letters for YA, SHA, HA and FA used in one particular Chinese Phags-pa text :

  • U+A86D PHAGS-PA LETTER ALTERNATE YA
  • U+A86E PHAGS-PA LETTER VOICELESS SHA
  • U+A86F PHAGS-PA LETTER VOICED HA
  • U+A870 PHAGS-PA LETTER ASPIRATED FA

The Yuan dynasty rhyming dictionary Menggu Ziyun 蒙古字韻 is one of the most important Phags-pa texts, as it gives the pronunciation in Phags-pa script for over 9,000 Chinese characters. However, the author (or editor of the only extant 1308 edition) attempts the impossible task of reconciling the pronunciation of the proto-Mandarin Chinese spoken at the time with the traditional phonetic classification of Chinese into thirty-six initials that had been developed during the Tang and Song dynasties several hundered years earlier.



As there was no longer a one-to-one correspondence between the historic thirty-six initials and the contemporary pronunciation, Menggu Ziyun uses variant forms of some letters to represent the contemporary Yuan dynasty pronunciation and at the same time maintain the historic phonetic distinctions of the traditional "thirty-six letters". The situation is rather complicated, and I won't go into details here (read here if you are interersted), but I'll summarise the relationship between the historic thirty-six initials and Phags-pa letters in the table below.


Historic Initial Phags-pa Letter
Number Example
Character
Phonetic
Value
Letter Unicode
Value
Phonetic
Value
1 k U+A842 GA g
2 U+A841 KHA
3 g U+A840 KA k
4 ŋ U+A843 NGA ŋ
5 t U+A84A DA d
6 U+A849 THA
7 d U+A848 TA t
8 n U+A84B NA n
9 ȶ U+A846 JA
10 ȶʼ U+A845 CHA tɕʼ
11 ȡ U+A844 CA
12 ȵ U+A847 NYA ȵ
13 p U+A84E BA b
14 U+A84D PHA
15 b U+A84C PA p
16 m U+A84F MA m
17 f U+A864 FA f
18 U+A870 FA f
19 v U+A864 FA f
20 ɱ U+A853 WA v
21 ts U+A852 DZA dz
22 tsʼ U+A851 TSHA tsʼ
23 dz U+A850 TSA ts
24 s U+A85B SA s
25 z U+A855 ZA z
26 U+A846 JA
27 穿 tɕʼ U+A845 CHA tɕʼ
28 U+A844 CA
29 ɕ U+A86E SHA ɕ
30 ʑ U+A85A SHA ɕ
31 x U+A85C HA h
32 ɣ
U+A863 XA
U+A86F HA
x
h
33
U+A856 -A
U+A857 YA
ʔ
j
34 j
U+A85D 'A
U+A86D YA

j
35 l U+A859 LA l
36 ȵʑ U+A854 ZHA ʑ

Notes

  1. The phonetic values of Initials 9-11 had converged with Initials 25-27 by the Yuan dynasty, and are not distinguished in MGZY
  2. The phonetic values of Initials 17-19 had converged by the Yuan dynasty, and are distinguished in MGZY by two forms of the letter FA. It may be that the original text of MGZY used three forms of the letter FA, but textual corruption in the only extant version of the book (an 18th century manuscript copy of a copy of ... the original 1308 printed edition) has obliterated the distinction; or it may be that because all three initials never occur with the same final, there is never any need to distinguish between more than one particular pair of the three historic initials for any given syllable, so two forms of the letter FA are sufficient.
  3. The phonetic values of Initial 29 and Initial 30 had converged by the Yuan dynasty, and are distinguished in MGZY by two forms of the letter SHA.
  4. The phonetic values of Initial 31 and Initial 32 had partially converged by the Yuan dynasty, so that the Phags-pa letter HA is used for Initial 31, and also for Initial 32 before the semi-vowel /j/ and front vowels excluding /i/, but the Phags-pa letter XA is used for Initial 32 before back vowels and /i/ (i.e. occurences of HA and XA are mutually exclusive).
  5. The situation for Initial 33 and Initial 34 is complicated and not entirely clear. Both Phags-pa letter -A ("Small A") and the normal form of Phags-pa letter YA are used for Initial 33 (historic null initial); whereas as both Phags-pa letter 'A (the null consonant) and a variant form of Phags-pa letter YA with a trumpeted bowl are used for Initial 34 (historic palatal initial).

Page from Menggu Ziyun


  • DZIM ꡒꡞꡏ 梫 etc. (historic *tsĭěm)
  • TSHIM ꡑꡞꡏ 侵 etc. (historic *tsʼĭěm)
  • SIM ꡛꡞꡏ 心 etc. (historic *sĭěm)
  • ZIM ꡕꡞꡏ 尋 etc. (historic *zĭěm)
  • SHIM1 ꡮꡞꡏ 深 etc. (historic *ɕĭěm)
  • SHIM2 ꡚꡞꡏ 諶 etc. (historic *ʑĭěm)
  • -IM ꡖꡞꡏ 音 etc. (historic *ĭěm)
  • YIM1 ꡗꡞꡏ 愔 etc. (historic *ĭěm)
  • YIM2 ꡭꡞꡏ 淫 etc. (historic *jĭěm)
  • LIM ꡙꡞꡏ 林 etc. (historic *lĭěm)

In summary, MGZY uses two different forms of each of the letters YA, SHA, HA and FA to represent historic phonetic differences for some syllables that were phonetically identical in Yuan dynasty proto-Mandarin. These glyph differences are not normally seen in other Yuan dynasty Chinese texts and inscriptions in the Phags-pa script; that is to say, in most extant Chinese Phags-pa texts other than MGZY only a single form of the letters YA, SHA, HA and FA are found, regardless of the historic phonetic value of the word that it occurs in. Thus, the use of the four characters U+A86D , U+A86E , U+A86F and U+A870 should normally be restricted to contexts involving MGZY.



And for those of you interested in historical Chinese phonetics, one of my projects for the spring is to produce an electronic version of the complete text of Menggu Ziyun.


Phags-pa Shaping Behaviour

Now that I have released my first Phags-pa font, I thought it would be useful to discuss Phags-pa shaping behaviour, as very few people are familiar with the script, and it is quite complex. Further information on the Phags-pa script, its encoding model and shaping behaviour can be found in Section 10.3 of The Unicode Standard version 5.0.

First of all, here is a table of the encoded Phags-pa characters (note that you need to have BabelStone Phags-pa Book installed to see the Phags-pa characters; also note that with IE the characters should be oriented vertically, but with other browsers they may not be).


Table of Encoded Phags-pa Characters

Code Point Character Character Name Usage
U+A840 PHAGS-PA LETTER KA Chinese
Mongolian
Sanskrit
Tibetan
U+A841 PHAGS-PA LETTER KHA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A842 PHAGS-PA LETTER GA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A843 PHAGS-PA LETTER NGA Chinese
Mongolian
Sanskrit
Tibetan
U+A844 PHAGS-PA LETTER CA Chinese
Tibetan
U+A845 PHAGS-PA LETTER CHA Chinese
Mongolian
Tibetan
Uighur
U+A846 PHAGS-PA LETTER JA Chinese
Mongolian
Tibetan
Uighur
U+A847 PHAGS-PA LETTER NYA Chinese
Sanskrit
Tibetan
U+A848 PHAGS-PA LETTER TA Chinese
Mongolian
Sanskrit
Tibetan
U+A849 PHAGS-PA LETTER THA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A84A PHAGS-PA LETTER DA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A84B PHAGS-PA LETTER NA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A84C PHAGS-PA LETTER PA Chinese
Mongolian
Sanskrit
Tibetan
U+A84D PHAGS-PA LETTER PHA Chinese
Sanskrit
Tibetan
U+A84E PHAGS-PA LETTER BA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A84F PHAGS-PA LETTER MA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A850 PHAGS-PA LETTER TSA Chinese
Sanskrit
Tibetan
U+A851 PHAGS-PA LETTER TSHA Chinese
Mongolian
Sanskrit
Tibetan
U+A852 PHAGS-PA LETTER DZA Chinese
Sanskrit
Tibetan
U+A853 PHAGS-PA LETTER WA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A854 PHAGS-PA LETTER ZHA Chinese
Tibetan
U+A855 PHAGS-PA LETTER ZA Chinese
Mongolian
Tibetan
U+A856 PHAGS-PA LETTER SMALL A Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A857 PHAGS-PA LETTER YA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A858 PHAGS-PA LETTER RA Mongolian
Sanskrit
Tibetan
Uighur
U+A859 PHAGS-PA LETTER LA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A85A PHAGS-PA LETTER SHA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A85B PHAGS-PA LETTER SA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A85C PHAGS-PA LETTER HA Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A85D PHAGS-PA LETTER A Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A85E PHAGS-PA LETTER I Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A85F PHAGS-PA LETTER U Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A860 PHAGS-PA LETTER E Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A861 PHAGS-PA LETTER O Chinese
Mongolian
Sanskrit
Tibetan
Uighur
U+A862 PHAGS-PA LETTER QA Mongolian
Uighur
U+A863 PHAGS-PA LETTER XA Chinese
Mongolian
U+A864 PHAGS-PA LETTER FA Chinese
Uighur
U+A865 PHAGS-PA LETTER GGA Unknown
U+A866 PHAGS-PA LETTER EE Chinese
Mongolian
Uighur
U+A867 PHAGS-PA SUBJOINED LETTER WA Chinese
Sanskrit
Tibetan
U+A868 PHAGS-PA SUBJOINED LETTER YA Chinese
Sanskrit
Tibetan
U+A869 PHAGS-PA LETTER TTA Sanskrit
U+A86A PHAGS-PA LETTER TTHA Sanskrit
U+A86B PHAGS-PA LETTER DDA Sanskrit
U+A86C PHAGS-PA LETTER NNA Sanskrit
U+A86D PHAGS-PA LETTER ALTERNATE YA Chinese
U+A86E PHAGS-PA LETTER VOICELESS SHA Chinese
U+A86F PHAGS-PA LETTER VOICED HA Chinese
U+A870 PHAGS-PA LETTER ASPIRATED FA Chinese
U+A871 PHAGS-PA SUBJOINED LETTER RA Sanskrit
Tibetan
U+A872 PHAGS-PA SUPERFIXED LETTER RA Tibetan
U+A873 PHAGS-PA LETTER CANDRABINDU Sanskrit
U+A874 PHAGS-PA SINGLE HEAD MARK Tibetan
U+A875 PHAGS-PA DOUBLE HEAD MARK Tibetan
U+A876 PHAGS-PA MARK SHAD Tibetan
U+A877 PHAGS-PA MARK DOUBLE SHAD Tibetan


1. Ligation

Phags-pa characters form syllable units in which the letters comprising a syllable ligate together, and each syllable unit is separated from each other by white space. Letters normally ligate along a stem running down the right side, but mirrored letters used for Sanskrit ligate along the left side, and the vowel o joins down a central stem. Examples of words in different languages are given below.


Chinese

mung gu wun ꡏꡟꡃ ꡂꡟ ꡓꡟꡋ

mengguwen 蒙古文 "Mongolian"


Mongolian

ta layi ꡈ ꡙꡗꡞ

dalai ᠳᠠᠯᠠᠢ "ocean"

Note that layi is considered a single syllable as ayi is used to represent a final /ai/ diphthong in Mongolian and Sanskrit.


Sanskrit

pra tish tthi te ꡌꡱ ꡈꡞꡚ ꡪꡞ ꡈꡠ

pratiṣṭhite


Tibetan

sangs rgyas ꡛꡃꡛ ꡲꡂꡨꡛ

sangs-rgyas "Buddha"


Uighur

quth luq ꡢꡟꡉ ꡙꡟꡢ

qutlugh "good fortune"



2. Vowel Forms

The four vowels I, U, E and O have distinct positional forms, as shown in the table below.



3. Mirrored Letters

A mirrored series of the letters TA, THA, DA and NA are used in the Sanskrit Phags-pa inscriptions at Juyongguan 居庸關. These letters, which represent the Sanskrit retroflex letters ṭa, ṭha, ḍa and ṇa, are not found in any other extant Phags-pa text or inscription. For example, on the 1348 Dunhuang inscription Sanskrit maṇi is represented in Phags-pa script as MA NI ꡏ ꡋꡞ with no mirroring. Note that a mirrored letter SHA representing Sanskrit ṣha does not occur, and so the kṣh combination is written with the Phags-pa letters KA followed by unmirrored SHA in the Juyongguan inscriptions.

These four mirrored letters affect the shape of the following letter as follows :

  • After the letters TTA, TTHA, DDA or NNA (or the mirrored form of the letters Subjoined YA and HA) a following letter I, U or E is mirrored, although in some places in the Juyongguan inscriptions the letter I is not mirrored after the letter TTHA.
  • After the letter NNA a following letter Subjoined YA is mirrored.
  • After the letter DDA a following letter HA is mirrored.
  • After the letters TTA or TTHA a following letter Small A may be mirrored, but in most instances in the Juyongguan inscriptions the Small A is not mirrored, presumably because a mirrored Small A is identical to the letter SHA.

When mirrored letters are joined together they ligate along a lefthand stem rather than the righhand stem as is normally the case. If the letter TTHA is followed by an unmirrored Small A the ligature may be on the right or the left side.

As the mirrored forms of the letters I, U, E, Small A, HA and Subjoined YA are contextual glyph variants they are not encoded as separate characters, but are automatically selected by the rendering system as appropriate. In practical terms this means that an OpenType Phags-pa font will have normal and mirrored forms of theses characters and apply a substitution rule to replace the normal form with the mirrored form after a mirrored form glyph. These rules are applied automatically by the rendering system so that the normal or mirrored form, as appropriate for the particular context, is displayed automatically without any need for user intervention.

My Phags-pa fonts follow the agreed shaping behaviour for Phags-pa (see section 10.3 of The Unicode Standard version 5.0), which is to mirror the glyph for the letters Small A [U+A856], HA [U+A85C], I [U+A85E], U [U+A85F], E [U+A860] and Subjoined YA [U+A868] after the letters TTA [U+A869], TTHA [U+A86A], DDA [U+A86B] or NNA [U+A86C] or after another mirrored glyph.

However, there are times when the user may wish to override the default mirroring behaviour, for example in order to display mirrored glyph forms in isolation or in order to represent those examples of unmirrored I after the letter TTHA or unmirrored Small A after the letters TTA and TTHA that occur in the Juyongguan inscriptions. This is acheived by means of variation selectors. For Phags-pa VS1 [U+FE00] is used to produce the opposite form of a reversing letter that would be expected from its context. This is an important distinction to note, as it differs from the behaviour of mathematical standardized variants, where a particular variation sequence always produces the same glyph. Thus for Phags-pa the sequence U, VS1 <U+A85F U+FE00> will produce an unmirrored letter U glyph if it occurs after one of the letters TTA, TTHA, DDA or NNA or after a mirrored glyphform of the letters I, U, E, Small A, HA or Subjoined YA, but will produce a mirrored letter U if the sequence occurs after any other Phags-pa letter or in isolation.

Some examples of Sanskrit words that have mirrored and unmirrored glyphs are shown below.


Mirrored I after TTHA, NNA

dhish tthi te ꡊꡜꡞꡚ ꡪꡞ ꡈꡠ [dhiṣṭhite]

ush nni ꡟꡚ ꡬꡞ [uṣṇīṣa]


Unmirrored I after TTHA

dhish tthi te ꡊꡜꡞꡚ ꡪꡞ︀ ꡈꡠ [dhiṣṭhite]

pra tish tthi te ꡌꡱ ꡈꡞꡚ ꡪꡞ︀ ꡈꡠ [pratiṣṭhite]


Mirrored U after NNA

kshu nnu ꡀꡚꡟ ꡬꡟ [kṣuṇu]


Mirrored E after TTHA, DDA, NNA

nish tthe ꡋꡞꡚ ꡪꡠ [niṣṭhe]

dann dde ꡊꡬ ꡫꡠ [daṇḍaya]

ha ra nne ꡜ ꡘ ꡬꡠ [haraṇe]


Mirrored HA after DDA

'a- kad ddha ya ꡝꡖ ꡀꡊ ꡫꡜ ꡗ [ākaḍḍhaya]


Mirrored Subjoined YA after NNA

pu nnya ꡌꡟ ꡬꡨ [puṇya]


Mirrored Small A after TTHA

dhish ttha- na ꡊꡜꡞꡚ ꡪꡖ ꡋ [dhiṣṭhana]


Unmirrored Small A after TTA, TTHA

sha tta- pa ra mi ta ꡚ ꡩꡖ︀ ꡌ ꡘ ꡏꡞ ꡈ [ṣaṭ pāramitā]

dhish ttha- na ꡊꡜꡞꡚ ꡪꡖ︀ ꡋ [dhiṣṭhana]


Thursday, 21 December 2006

Phags-pa Fonts 1 : BabelStone Phags-pa Book

Part of the 1345 Phags-pa Sanskrit inscription at Juyongguan



To celebrate the recent encoding of the Phags-pa script in Unicode 5.0 I am releasing some free OpenType Unicode Phags-pa fonts that fully implement Phags-pa shaping behaviour (for which see Section 10.3 of The Unicode Standard version 5.0). These fonts work correctly under Windows XP and later, although I have had to set the script tag in the OT tables to <latn> rather than <phag> in order to trick Uniscribe into applying the font's OpenType features [insert long and bitter anti-Uniscribe rant here]. I'm afraid that I have no idea whether these fonts will work on platforms other than Windows.

The first font that I am releasing is BabelStone Phags-pa Book, which is a general purpose Phags-pa font which emulates the simple lines of Phags-pa letters used in Yuan dynasty printed Phags-pa texts such as Menggu Ziyun 蒙古字韵 and Baijiaxing Mengguwen 百家姓蒙古文. The font may be downloaded from here.

To demonstrate that my Phags-pa fonts do work in principle on Windows XP and later, here is a rotated screenshot of Notepad running under Windows XP (Uniscribe version 1.0420.2600.2180), showing the text of the Phags-pa inscription pictured at the top of this page rendered with "BabelStone Phags-pa Book" at 20 points (this sample of text shows features such as glyph ligation, positional vowel forms, contextual mirroring and overriding of contextual mirroring using standardized variants) :



However, not all applications will let you display correctly shaping Phags-pa text. For example I have been totally unable to get Microsoft Word 2003 or 2007 to apply any of my Phags-ps fonts to selected Phags-pa text, and whatever I try all I get are little square boxes [not true -- see Addendum 2 below]. I guess that this is expected behaviour for Word, which many of us who work with complex scripts consider to be the epitome of evil. OpenOffice.org copes slightly better, in that it lets you apply a Phags-pa font, but it unfortunately does not apply any of the font's OpenType features, so that Phags-pa text is rendered as a sequence of non-shaping glyphs. The same problem is seen with Internet Explorer 6 and 7, which will use my Phags-pa fonts if applied in a stylesheet, but will not apply any of the OpenType features. The screenshot below shows the above Notepad document as displayed in IE7 on Windows XP. Note that there is no shaping behaviour (no glyph ligation, no positional vowel forms, no contextual mirroring) [also not entirely true -- see Addendum 1 below] :



In contrast, Mozilla Firefox 2.0 does support the OpenType features in my Phags-pa fonts (not that difficult ... all it has to do is use the Uniscribe API), and so renders the Phags-pa document correctly [also not entirely true -- see Addendum 3 below] :



Finally, here is the actual Phags-pa text that I have been testing with, so you can see how your system copes with it (you must first install BabelStone Phags-pa Book). The text is laid out horizontally, with line 1 at the bottom, and so you should read it either by twisting your head anticlockwise 90 degrees or by turning your monitor clockwise 90 degrees (IE does support vertical layout, but other browsers, such as Firefox, do not, so for maximum browser compatibility I have used horizontal layout here).


Sample of Phags-pa Sanskrit Text

[Part of the Uṣṇīṣavijaya-dhāraṇī 佛頂尊勝陀羅尼經]


ꡏꡟ ꡋꡞ ꡏꡟ ꡋꡞ ᠂ ꡏ ꡜꡖ ꡏꡟ ꡋꡞ ᠂ ꡓꡞ ꡏꡟ ᠁

ꡈꡞ ꡋꡞ ꡓꡘ ꡈ ꡗ ᠃ ꡏ ꡏ ꡝ ꡗꡟꡘ ꡓꡞ ꡚꡟꡊ ᠁

ꡜꡖ ꡏꡟ ꡊꡱꡠ ᠃ ꡎ ꡒꡱ ꡀꡖ ꡗ ᠃ ꡳꡛ ꡜ ᠁

ꡏꡞ ᠃ ꡌꡱ ꡈꡞꡚ ꡪꡞ︀ ꡈꡠ ᠃ ꡛꡘ ꡓ ꡈ ꡉꡖ ᠁

ꡉꡖ ꡂ ꡈ ᠃ ꡝ ꡓ ꡙꡡ ꡀꡞ ꡋꡞ ᠂ ꡚ ꡩꡖ︀ ꡌ ᠁

〔ꡛ〕ꡧ ꡎꡜꡖ ꡓ ᠃ ꡓꡞ ꡚꡟꡊ ꡊꡜꡠ ꡟꡚ ꡬꡞ ᠁

〔ꡝꡖ〕 ꡜ ꡘ ꡝꡖ ꡜ ꡘ ᠂ ꡏ ꡏ ꡝ ꡗꡟꡘ ꡛꡋ ꡊ ᠁

〔᠁〕 ꡈ ꡛꡟ ꡂ ꡈ ᠃ ꡓ ꡘ ꡓ ꡐ ꡋ ᠁

〔ꡎ〕ꡜꡖ ꡛ ꡛꡎꡖ ꡘ ꡬ ꡂ ꡈꡞ ꡂ ꡂ ᠁

〔᠁ꡗ〕 ꡉꡖ ꡳꡡ ꡳꡎꡜꡖꡱꡟ ꡳꡎꡜꡖꡱꡟ ꡳꡎꡜ ᠁

〔ꡳꡡ〕 ꡳꡎꡜꡖꡱꡟ ꡛꡧꡖ ꡜꡖ ᠅ ꡳꡡ ꡋ ꡏꡡ ꡎꡜ ꡂ ꡓ ᠁



And if all this has whetted your appetite for writing Phags-pa yourself, I have created a Phags-pa keyboard layout that can be used on Windows 2000 and later, which can be downloaded from here.

In the next installment I will discuss Phags-pa shaping behaviour in some more detail, and there will be some more Phags-pa fonts available for download in a few days time, so keep watching this space.



Addendum 1 [2006-12-22]

Sharp-eyed readers will have noticed, as I only did this morning, that my statement that Internet Explorer does not apply the OpenType features of my Phags-pa font is not entirely true. If you look carefully at the screenshot of Internet Explorer you will notice that there are in fact two short sections of correctly shaping Phags-pa text -- ꡩꡖ︀ on line 7 and ꡌꡱ ꡈꡞꡚ ꡪꡞ︀ on line 8. At first glance these islands of shaping in a sea of unshaping would seem to be inexplicable, but when you look at the underlying character codes (<A869 A856 FE00> and <A84C A871 0020 A848 A85E A85A 0020 A86A A85E FE00> respectively) the reason becomes clear(ish) -- these sections of text both contain variation selectors (VS-1, which reverses the default mirroring behaviour of the preceding character), so evidently Internet Explorer is applying the font's OpenType features when and only when variation selectors are involved. My guess is that as InternetExplorer does not recognise the Phags-pa script, it treats Phags-pa (and other Unicode 5.0) characters as a non-complex script and outputs the characters directly without the help of Uniscribe, but when it encounters a variation selector, then it decides it does need to treat the run which includes the variation selector as a complex script, and outputs the run using Uniscribe.



Addendum 2 [2006-12-23]

I've just been informed that Word 2003 does let you use BabelStone Phags-pa Book for Phags-pa text, and when I just retested with Word 2007 I also found that I had no problems using my fonts, although Word still does not apply the OpenType shaping unless variation selectors are involved (i.e. it has the same behaviour as Internet Explorer). I can't explain why I had problems with Word 2003 and 2007 on two different machines a few days ago, but no problems today -- I can only suppose it may have been some difference between the beta font I was testing with and the released font ... I think I had better just blame user error. Anyway, please do keep me informed of any success or failure you might have in using the font with different applications.



Addendum 3 [2008-11-13]

I originally stated that Firefox supports OpenType features in my Phags-pa font. I have just realized that this is not entirely true. The sample Phags-pa text only renders correctly in Firefox because each line includes at least one punctuation mark from the Mongolian block, and so the text is being passed through the Mongolian text rendering system. Unfortunately, if you remove all the Mongolian punctuation marks the Phags-pa text no longer shows any joining or shaping behaviour :-(

As expected, Google Chrome does not render Phags-pa text correctly, and nor does IE8, so at present there is no browser that I am aware of that does unconditionally apply joining and shaping behaviour to Phags-pa text.