PA specification

The encoding of the PA script: syllable grammar, characters, code points and how a font composes them.

PA guide

Draft. Version 0.1. The specification defines the character repertoire, its code points and how a font composes the glyphs. The code points are provisional and lie in the Supplementary Private Use Area-A. There is no reference font yet, so the tables of the specification show no glyphs.

Syllable grammar

A syllable is written with the four kinds of component of a Vietnamese syllable: onset (A), nucleus (N), coda (C) and tone (T). The nucleus includes the glide: oa, uy and similar are nuclei of their own. Two control characters of PA build the cells, as in QATT: the joiner J (U+F00D0, PA JOINER) puts two parts side by side into one cell, the combiner K (U+F00D1, PA COMBINER) stacks two cells into one.

Stem     = A J N
Syllable = Stem [ T ]            one cell: the stem with a small tone mark
         | Stem C [ T ]          two cells: the stem, then the coda with its tone
         | Stem K Ext            one cell: the stem above the extension
Ext      = C [ T ]  |  T
Alone    = A | N | C [ T ] | T   a cell of its own, full size

K chooses the layout, and it is optional:

Character repertoire

23 onsets, 22 nuclei, 10 codas and 6 tones are encoded, 61 characters, and the joiner and the combiner, 63 in all. The combined glyphs are not encoded: the font builds them from sequences (see Composition).

ClassCountCombined with
A onset23J N: 23 × 22 = 506 stem glyphs
N nucleus22—
C coda10T: 10 × 6 = 60 coda glyphs
T tone6—
J joiner—onset and nucleus into a stem
K combiner—stem and extension into one stacked cell

Code points

The classes lie in separate ranges, so the class of a character is known from its code point and a sequence is validated with a regular expression. The block starts at U+F00D0 with the two control characters. Before it, U+F00B0..U+F00CF is the block of the controls that PA and QATT share: annotation over U+F00B0, annotation under U+F00B1 (a CJK character, the control and a syllable: the syllable is written small over or under the character), U+F00B2 end of the annotation (reserved); U+F00B3..U+F00CF are free.

ClassRangeUsedCode point
J joinerU+F00D01PA JOINER
K combinerU+F00D11PA COMBINER
A onsetU+F00D2..U+F00E823F00D2 + i
N nucleusU+F00E9..U+F00FE22F00E9 + i
C codaU+F00FF..U+F010810F00FF + i
T toneU+F0109..U+F010E6F0109 + (tone − 1)
[U+F00D2-F00E8] ( U+F00D0 [U+F00E9-F00FE] ( [U+F0109-F010E] | U+F00D1? [U+F00FF-F0108] [U+F0109-F010E]? | U+F00D1 [U+F0109-F010E] )? )?
| [U+F00E9-F00FE] | [U+F00FF-F0108] [U+F0109-F010E]? | [U+F0109-F010E]

The order inside each class is that of the earlier PA font, see The earlier font.

A: onsets

iCode pointCharacter nameLegacy nameQuốc Ngữ
0U+F00D2PA ONSET ZERO_none (placeholder shape)
1U+F00D3PA ONSET Bbb
2U+F00D4PA ONSET Ccc, k, q
3U+F00D5PA ONSET CHchch
4U+F00D6PA ONSET DDdđ
5U+F00D7PA ONSET Ddzd
6U+F00D8PA ONSET PHphph
7U+F00D9PA ONSET Ggg, gh
8U+F00DAPA ONSET GIgigi
9U+F00DBPA ONSET Hhh
10U+F00DCPA ONSET KHkhkh
11U+F00DDPA ONSET Lll
12U+F00DEPA ONSET Mmm
13U+F00DFPA ONSET Nnn
14U+F00E0PA ONSET NGngng, ngh
15U+F00E1PA ONSET NHnhnh
16U+F00E2PA ONSET Rrr
17U+F00E3PA ONSET Sss
18U+F00E4PA ONSET Ttt
19U+F00E5PA ONSET THthth
20U+F00E6PA ONSET TRtrtr
21U+F00E7PA ONSET Vvv
22U+F00E8PA ONSET Xxx

The character names are Unicode style (PA ONSET …, PA VOWEL …, PA CODA …, PA TONE …) and spelled in Telex, after the main spelling of the sound: DD = đ, D = d, AW = ă, AA = â, OW = ơ, UW = ư, EE = ê, OO = ô. The drawings of these characters are the full-size master forms; every other form (smaller onsets, stacked forms) is derived from them. In code (glyph names, input methods) the zero onset is written z. The legacy name is that of the earlier font.

dz is the sound written d, d the sound written đ. The shape of an onset depends on the nucleus it stands with (large, small, extra small); that is part of the stem glyph, not of the encoding.

N: nuclei

iCode pointCharacter nameLegacy nameShapeQuốc Ngữ
0U+F00E9PA VOWEL Aaaa
1U+F00EAPA VOWEL OWara2ơ
2U+F00EBPA VOWEL AWaeawă
3U+F00ECPA VOWEL AAaeraw2â
4U+F00EDPA VOWEL EEeeê
5U+F00EEPA VOWEL Eere2e
6U+F00EFPA VOWEL Iiii
7U+F00F0PA VOWEL IEEiri2iê, ia, yê, ya
8U+F00F1PA VOWEL OOooô
9U+F00F2PA VOWEL Ooro2o
10U+F00F3PA VOWEL Uuuu
11U+F00F4PA VOWEL UOOuru2uô, ua
12U+F00F5PA VOWEL UWyyư
13U+F00F6PA VOWEL UWOWyry2ươ, ưa
14U+F00F7PA VOWEL OAwawaoa
15U+F00F8PA VOWEL UOWwarwa2uơ
16U+F00F9PA VOWEL OAWwaewawoă
17U+F00FAPA VOWEL UAAwaerwaw2uâ
18U+F00FBPA VOWEL UEEweweuê
19U+F00FCPA VOWEL OEwerwe2oe
20U+F00FDPA VOWEL UYwiwiuy
21U+F00FEPA VOWEL UYEEwirwi2uyê, uya

The names are those of the earlier font. Shape is the name of the base stroke in the drawing; a nucleus starting with w is a glide nucleus (the stroke of the glide plus the stroke of the vowel).

C: codas

iCode pointCharacter nameLegacy nameQuốc Ngữ
0U+F00FFPA CODA UUu, o
1U+F0100PA CODA IIi, y
2U+F0101PA CODA MMm
3U+F0102PA CODA NNn
4U+F0103PA CODA NGNGng
5U+F0104PA CODA NHNHnh
6U+F0105PA CODA PPp
7U+F0106PA CODA TTt
8U+F0107PA CODA CCc
9U+F0108PA CODA CHCHch

T: tones

ToneCode pointCharacter nameVietnamese
1U+F0109PA TONE SACsắc
2U+F010APA TONE HUYENhuyền
3U+F010BPA TONE HOIhỏi
4U+F010CPA TONE NGAngã
5U+F010DPA TONE NANGnặng
6U+F010EPA TONE NGANGngang (level tone, an explicit mark)

Composition

A font renders the sequences with glyph substitution (OpenType ccmp). The classes tell what belongs together within a cell; the joiner and the combiner build the cells.

SequenceResult
A, N, C, Tone cell each in the full size: the master drawings (23 + 22 + 10 + 6)
A J Nstem glyph, onset and nucleus reduced to fit one cell (506)
A J N Tthe stem with a small tone mark inside the cell (the tone becomes a mark without width, 6)
C Tcoda glyph with its tone (60)
A J N C [T]two cells: the stem, then the coda
A J N K E (E = C T, C or T)one cell: the stem in its stacked form above, the extension in its stacked form below (see below)
N without an onsetthe nucleus alone in its full size; for a syllable without an onset an input method writes z J N

Every cell is one em wide.

The stacked cell

With the combiner stem and extension share one em square, like a CJK character; without it they are two cells. Both forms come from the drawings of PA 1 Normal. The stacked forms are drawn for the stack, they are not squeezed copies of the separate forms, and the font has them as glyphs of their own.

Top to bottom the stacked cell holds the stem, then the tone mark, then the coda. The stem is drawn in one of three heights, which depends on what follows the combiner:

After A J N KStem formHeight of the stem
C T (coda and tone)Zsmallest, about a quarter of the cell
C alone, or T alone (not tone 2)ZZabout a third to a half of the cell
T2 alone (huyền)ZZZlargest, more than half: tone 2 is a single bar at the bottom

So the stacked cell is not a precomposed glyph for every pair (506 × 76 = 38,456 glyphs). The font substitutes the three parts separately, as the stack of QATT does it:

Where the drawings of the ZZZ form are missing (the onsets ph, ng, t, th, tr and the glide bars), the font uses the ZZ form.

Only the large forms of onsets, nuclei and glides are master drawings. The smaller onsets (small, extra small) and the stacked heights Z, ZZ and ZZZ are derived from them by one fixed scaling for each size and each family, applied to the strokes before they are drawn, so that the stroke keeps its width. A stem is made of its parts (onset, glide, nucleus) and has no outline of its own. Codas, tones and the lower forms of the stack are drawings of PA 1 Normal; for a form it lacks the font takes the nearest drawing, and for tone 6 in the stack the unstacked tone flattened.

PA and QATT

PA is a constructed script made for this website. Its font is a file of its own, not part of the QATT fonts and not part of the big Chữ Nôm fonts:

Reading Quốc Ngữ

A syllable of Quốc Ngữ is split into onset, nucleus, coda and tone, then mapped to the names above.

The earlier font

The earlier PA font pa.ttf of the old site has the same repertoire in the Basic Multilingual Plane private use area (U+E001..U+E272, with the tone 6 missing). Its code points convert to this block:

Earlier code pointNew
stem E062 + a + 23·(1 + b)A = a, N = b
onset alone E062 + aA = a
coda and tone E026 + 10·t + cC = c, T = t (t = 0: no tone)
tone alone E001..E005T = 1..5

Open points

  1. Tone marks. PA has its own six tone characters, as it has its own joiner and combiner. Proposal: keep them separate from QATT.
  2. Unfinished drawings. Tone 6 (ngang) is not complete in the source: its stacked forms with a coda (z-_t6) are missing, the stacked tone alone is a copy of the unstacked one, and the unstacked large tone 6 is a copy of tone 5. Its list of onsets also marks x as “todo”.
  3. Combinations that Vietnamese does not use (for instance b with a glide nucleus). Proposal: the font draws all 506 stems, the input method decides what is offered.