Miao Unicode

Open source font for users of the Miao script

Miao Unicode is an open-source, Graphite enabled font which supports the Miao, or ‘Pollard’, script.

Miao was officially added to Unicode in January 2012. The Miao Unicode font makes use of this standardized encoding.

The font aims to be fully functional for all the varieties of the script in current use. (Fonts made before Miao was included in the Unicode Standard, like the Ahmao font, were specialized for only one of the several user communities.)

The design is based on Adobe’s Source Sans Pro.

Both Miao Unicode and Adobe Source Sans Pro are licensed under SIL’s Open Font License, which means that they are available free of charge, and access is provided to the source files. Details of the license are given on SIL’s OFL page.

The Miao script was developed Samuel Pollard (d. 1915) and others for the A-Hmao language of Southern China (Yunnan province). Pollard took inspiration from the script now called “Canadian Aboriginal Syllabics”, invented by James Evans in the 1830s. Miao is sometimes called the “Pollard” script.

The script’s form fluctuated for the first few decades, and became more standardized in 1936. Reforms were proposed in the 1950s which were not widely adopted. A further reform was proposed in 1988 which received greater, if still partial, adoption.

The Unicode Standard officially encoded Miao in version 6.1.0, January 2012. The Miao Unicode block includes a number of archaic and 1950s-reform variants in addition to the modern character forms.

Several languages are written in the Miao script—according to Daniels (1994: 581), “about a dozen” (many of which are also written in one or more other scripts). Examples include: the A-Hmao language of about 300,000 speakers, also known as “Large Flowery Miao” as a translation of the Chinese name 大花苗 ‘dà huā miáo’; the Lipo language of about 250,000 people (or ‘Eastern/Central Lisu’); and some language groups of the Yi nationality (~500,000?). It is not known for certain how many speakers of these languages use the Miao script actively. One suggestion is 200,000–500,000 people in total [source (pdf)].

This information is condensed from the following sources:

The Miao script requires complex text rendering. The Miao Unicode font achieves this by using the Graphite system produced by SIL.

Therefore if you would like to view samples or test the font on this webpage, you need to make sure that your browser has Graphite support.

Currently Mozilla Firefox (Version 11+) is the only browser that supports Graphite. (Some other Mozilla-based browsers, like SeaMonkey, may support it as well.)

Once you are in Firefox, you probably will need to enable Graphite. But first check if it’s already working. In the left hand box the small ‘U’ should be sitting on top of the main character. If it is, Graphite is working in your browser.

‘U’ above:

𖼞𖽪𖾑

‘U’ beside (for comparison):

𖼞𖽪

If the small ‘U’ stays on the baseline (like in the comparison ‘beside’ box), with a dotted circle to the right of it, Graphite is not working.

Enable Graphite by following these steps:
(copied from Graphite’s own website thanks to CC-BY-SA)

  • Type about:config in your address bar.
  • Press Enter.
  • Click on the “I’ll be careful, I promise” button. This big warning is to make sure you really know what you are doing when changing any advanced parameters, as you could easily introduce problems with core configuration settings. We will only make a small change to one Graphite-related parameter. (You should be able to go back and toggle parameters off if needed.)
  • Type graphite in your search bar to look for the right parameter. Firefox will show you the following configuration preference name: gfx.font_rendering.graphite.enabled. Alternatively, you can just scroll down the page to find an option called gfx.font_rendering.graphite.enabled.
  • Double-click on the preference name line to set the value from false to true. You will see the whole line becoming bold.

Once you have gone through these steps, look again at the ‘U’ above box to check it is now displaying correctly. If it is still not, I recommend:

  1. Check your Firefox version by clicking ‘Help > About’. If it is lower than 11 then you need to upgrade. (As of May 2013, the latest version is 20.0.)
  2. Look through the official Graphite in Firefox documentation.

One other aspect of Graphite support to check is the ability to use features. If you are using version 15 of Firefox or higher then the following features should display correctly:

Lower/upper case (normal):

Yúnlǐng Shānmài

Small caps:

Yúnlǐng Shānmài

Lining figures (all high):

0123456789

Old-style figures (low and high):

0123456789

Comparison of existing scanned images with the equivalent in the Miao Unicode font.

For a stress-test of hypothetical but unattested combinations, see MiaoTest.

Miao Unicode rendering

Coming soon.

Original image

Coming soon.

Input order

The input order is important in order to achieve consistent sorting order in lists.

The initial (usually a consonant) of the syllable must always come first.

This is true even when the pre-nasalization marker ‘𖽐’ comes before it. If you type the initial first and the nasal marker second then the nasal marker will jump before it, like so:

𖼎 + 𖽐 = 𖼎𖽐

If there is an aspiration sign then it should come next:

𖼎𖽐 + 𖽑 = 𖼎𖽐𖽑

(You must have the nasal marker before the aspiration marker.)

The final (usually a vowel, sometimes with n or ng) should come next. A combination of two finals is allowed, but not more.
If you know of situations where a combination of three finals is required, please file an issue on github. I have never seen this, however, and it does not seem likely.

Lastly the tone marker is added.

There are two ways of marking the tone in modern use: by position (the most common option), or by a tone letter (used in the Chuxiong orthography).

Tone marking by position:

𖼎𖽐𖽑 + 𖽦 + 𖾑 = 𖼎𖽐𖽑𖽦𖾑

Tone marking by letter (Chuxiong):

𖼎𖽐𖽑 + 𖽦 + 𖾔 = 𖼎𖽐𖽑𖽦𖾔

This table summarizes the input stages.

Order 1 2 3 4 5
Character type initial + (nasal) + (asp) + final + tone marker [result]
Example 𖼎 𖽐 𖽑 𖽦 𖾑 𖼎𖽐𖽑𖽦𖾑
Transliteration q n- -h ie tone 1 (rising) nqhié “look for”

Try it

Experiment with the Miao Unicode font by copying and pasting from the charts below into this box.

These features allow you to use different styles. For further explanation, see the “Graphite features” section below.

Miao:
Latin:

The following charts give a summary of the Miao Unicode block according to character type. The Unicode transcriptions are given here; for IPA see the Miao Omniglot page.

Initials (~consonants):

𖼀 𖼁 𖼂 𖼃 𖼄 𖼅 𖼆 𖼇 𖼈 𖼉 𖼊 𖼋 𖼌 𖼍
pa ba pa* pla ma mha ma† fa va vfa ta da tta* ta*
𖼎 𖼏 𖼐 𖼑 𖼒 𖼓 𖼔 𖼕 𖼖 𖼗 𖼘 𖼙 𖼚 𖼛
tta dda na nha nna* na† nna nnha la lya lha lhya tlha dlha
𖼜 𖼝 𖼞 𖼟 𖼠 𖼡 𖼢 𖼣 𖼤 𖼥 𖼦 𖼧 𖼨 𖼩
tlhya dlhya ka ga ka* qa qga nga ngha nga† ha xa gha ghha
𖼪 𖼫 𖼬 𖼭 𖼮 𖼯 𖼰 𖼱 𖼲 𖼳 𖼴 𖼵 𖼶
tssa dzza nya nyha tsha dzha tsha* dzha* tsha‡ sha ssa zha zsha
𖼷 𖼸 𖼹 𖼺 𖼻 𖼼 𖼽 𖼾 𖼿 𖽀 𖽁 𖽂 𖽃 𖽄
tsa dza tsa* sa za zsa zza zzsa zza† zzya zzsya wa ah hha

Modifiers:

𖽐 𖽑 𖽒 𖽓
nasalization aspiration voicing aspiration‡

Finals (~vowels):

𖽔 𖽕 𖽖 𖽗 𖽘 𖽙 𖽚 𖽛 𖽜 𖽝 𖽞 𖽟 𖽠 𖽡 𖽢
a aa ahh an ang o oo wo w e en eng oey i ia
𖽣 𖽤 𖽥 𖽦 𖽧 𖽨 𖽩 𖽪 𖽫 𖽬 𖽭 𖽮 𖽯 𖽰 𖽱
ian iang io ie ii iu ing u ua uan uang uu uei ung y
𖽲 𖽳 𖽴 𖽵 𖽶 𖽷 𖽸 𖽹 𖽺 𖽻 𖽼 𖽽 𖽾
yi ae aee err err er er ai ei au ou n ng

Tones:

𖾏 𖾐 𖾑 𖾒 𖾓 𖾔 𖾕 𖾖 𖾗 𖾘 𖾙 𖾚 𖾛 𖾜 𖾝 𖾞 𖾟
5 3 1 7† 1‡ 2‡ 4‡ 5‡ 6‡ 8‡

* Yi language variant
† Archaic form
‡ Post-1949 reform variant; probably obsolete
§ Chuxiong A-Hmao variant

  • For an explanation of the tone numbers for positions in the A-Hmao language see Sounds & Symbols of Ahmao (pdf).
  • For an explanation of the Chuxiong tone letters (marked §), see the ‘Unified Miao’ table on Wikipedia and compare the pinyin letters with the Miao equivalents given here (pdf).
    NB: there appears to have been a change in tone classification between that preliminary proposal, where ‘𖼻’ marks tone 1 and tone 3 is unmarked, and the final encoding, where ‘𖼻’ marks tone 3 and tone 1 is unmarked, apparently following the publication of this chart (Illustration 1; pdf).

See “Keyboard for Linux” for instructions on how to type using your keyboard (Linux only, not Mac or Windows).

Download the font file from the github page. Click ‘view raw’ and save the file to a location of your choice.

The install procedure varies according to your system. Most modern operating systems have an “install” button on the window that appears when you open the font. Click the install button.

In Windows XP you need to copy the file into the C:\Windows\Fonts directory.

(If you need more help with the font installation, there are a number of websites which give instructions. See for example Adobe’s page on installing fonts in Windows and Mac.

After installing, check that it’s working by restarting your browser and going to Alan Wood’s test page. This is also a helpful reference resource. If all of the characters display, the font has probably installed correctly.

As Alan Wood suggests, it can be helpful to compare the characters which appear on the test page with the Official Unicode chart (pdf).

The font can only be used properly in an application which supports Graphite. A list of these is given on the Graphite website. (Note that Microsoft Word cannot display Miao Unicode correctly.)

For most users the most important application which supports Graphite will probably be the word processor LibreOffice Writer.

For Linux users, it is possible to expand the number of Graphite-supporting applications by installing the pango-graphite package. (For example, this will enable Graphite support in gedit and Inkscape.)

I have developed a Miao keyboard layout for Linux systems. I do not intend to create keyboard layouts for Mac or Windows, but I would encourage others to build on my work to do so.

If you do not use Linux but you need to use the keyboard layout, remember that there are various options for installing a Linux operating system alongside your current one (for example, see Ubuntu Windows installer and Ubuntu dual boot).

The Miao layout very roughly corresponds to the sounds of the Latin letters on the qwerty keyboard.

Please contact me (or file an issue on Github) if you have a suggestion for how to improve the keyboard layout.

It has been tested to work on Ubuntu, and the “easy method” installation instructions are specifically for Ubuntu.

The keyboard should work properly on other distributions (e.g. Linux Mint, Fedora, and the Ubuntu derivatives), but the files may need to be placed in different locations.

Easy installation method

Save these two files in your “Downloads” folder:
right-click and choose “save link as”

Open a terminal. You can do this by holding down ‘ctrl’ and ‘alt’ and pressing ‘t’.

In the terminal, copy and paste this line.
Note that in the terminal you have to add ‘shift’ in order to paste: ctrl + shift + v. You can also use the menu to select Edit > Paste.

sudo cp ~/Downloads/miao /usr/share/X11/xkb/symbols/miao

The terminal will now ask for your password. Type it and press enter.
Note that the terminal does not display dots or stars while you type your password, so it might look like it’s not working. Don’t worry, it is working.

When you have typed the password it will now go onto a new line. That means it has successfully copied the file from your Downloads folder to the place where the computer can use it.

You now need to do the same for the second file. Copy this line into the terminal:

sudo cp ~/Downloads/evdev.xml /usr/share/X11/xkb/rules/evdev.xml

This time it should not ask for your password because you just typed it a minute ago.

You must now restart your computer before the keyboard can be used.

When you have restarted, go the “Keyboard Layout” menu. You can find it in the system settings, or on the top panel under the keyboard icon.

Click the ‘+’ button.
If you have four keyboard layouts already then this button will be inactive and you will need to remove one keyboard before you can add another.

You can find the Miao keyboard either by simply typing ‘Miao’, or by typing ‘China’ as this is the primary country where it is used.

Click ‘add’. Your keyboard is now ready to use!

The layout

The keyboard layout is as follows:

Miao keyboard layout
Miao keyboard with latin

Each key has four possible options:

  1. Normal: bottom left hand corner, black
  2. Shift: top left hand corner, grey
  3. Alt (right): bottom right hand corner, blue
  4. Alt (right) and shift: top right hand corner, light blue

The Chuxiong tone letters can be typed using the alt (right) and the relevant number.

Usually if there is a Yi variant, it is accessed with the alt (right) key.

If a final has a vowel + nasal combination, …n is under the alt (right) key, and …ng is under the alt + shift combination.

Advanced information

Further details about keyboard layouts in Linux can be found at Daniel Paul O’Donnell’s blog and the Ubuntu documentation. The following is a brief summary based on these resources.

If you would like to have more control over the keyboard installation, you need to copy the ‘miao’ file into the layouts folder (in Ubuntu this is /usr/share/x11/xkb/symbols), and then edit the layout list so that the file can be recognized. In Ubuntu this file is evdev.xml, in /usr/share/x11/xkb/rules.

The body of this file is the <layoutList>. You can add the Miao entry anywhere in this section. I added it at the end, just before the </layoutList> end marker.

The code needs to include information about the file name, script code, and the relevant languages and countries, as shown below:

    <layout>
      <configItem>
        <name>miao</name>
        <shortDescription>miao</shortDescription>
        <description>Miao</description>
        <countryList>
          <iso3166Id>CN</iso3166Id>
        </countryList>
        <languageList>
          <iso639Id>hmn</iso639Id>
          <iso639Id>hmd</iso639Id>
          <iso639Id>lpo</iso639Id>
          <iso639Id>ywq</iso639Id>
          <iso639Id>ysy</iso639Id>
        </languageList>
      </configItem>
    </layout>

The iso3166 country codes can be found on Wikipedia, and the iso639 language codes can be found at Ethnologue.

If you would like to customize the keyboard in some way, the xkb system makes this very easy.

Here is an example of one line from the keyboard layout:

key <AE04> { [        4,      dollar,  0x1016F95,  0x1016F9C ] };

This shows the four characters availabed under the key (the number 4): the first one shows normal, the second +shift, the third +alt (right), and the fourth +alt+shift.

If you wanted, for example, to have the Yuan/Yen sign ¥ instead of the dollar sign, you could replace “dollar” with U00A5.

The Miao characters require 0x10 before the Unicode hex value as they are in the Supplementary Multilingual Plane (not the Basic).

There do not seem to be any conventions regarding licensing for keyboard layouts as they are usually packaged with other software. For the sake of clarity, this keyboard layout is licensed under the MIT License so that it can be easily modified and distributed.

The font relies on Graphite programming to work, but Graphite also gives scope for stylistic features.

Features for Miao

There are three features currently available for the Miao script:

  • Chuxiong ‘wart’ variant
  • Stylistic alternates for 𖼳 and 𖼴
  • Aspiration marker always on right

The ‘wart’ (a translated technical term!) is the small circle in characters like 𖼁, 𖼅, and 𖼾. In the Chuxiong orthography, it is rendered not as a circle but as a dot on the right of the letter, as shown in point 5 here (pdf).

Miao Unicode has a feature called “chux” for handling this. In LibreOffice you can use this style by typing “Miao Unicode:chux=1” into the font field.

‘Wart’ as circle:

𖼁 𖼅 𖼾

‘Wart’ as dot (Chuxiong):

𖼁 𖼅 𖼾

The ‘Stylistic Alternates’ in Miao Unicode are variant letter shapes which are not associated with particular regions or orthographies. In LibreOffice, the code to use these is “salt=1”. At present there are only two letters with stylistic alternates:

Standard:

𖼳 𖼴

Stylistic alternates:

𖼳 𖼴

The aspiration marker is usually placed at the top right of the letter, as in 𖼎𖽐𖽑𖽦𖾑. In the Parsons brothers’ Ahmao archive, there is an exception to this rule: letters based on ‘ma’ 𖼄 and ‘na’ 𖼐 (that is, nasal consonants) have the aspiration marker on the left. This pattern has been adopted in the Miao Unicode font. If you would like to disable this, however, you can do this using the feature “aspr” (aspiration always on the right).

Aspiration marker left on nasals:

𖼄𖽑 𖼐𖽑 𖼤𖽑

Aspiration marker always on right:

𖼄𖽑 𖼐𖽑 𖼤𖽑

It is possible to combine these features in LibreOffice by using the & sign. To use all three, type “Miao Unicode:chux=1&salt=1&aspr=1” into the font field.

For those interested in the kerning currently operational in the Miao Unicode font, the following examples give an illustration. In the present version there are just six kerning classes: a ‘major’ (about -35% of average glyph width) and a ‘minor’ (about -10%) class for inset bottom (‘V’ shape), and the same for inset top (‘A’ shape) and inset middle (‘C’ shape). As mentioned in the Known Issues, the kerning, positioning and spacing require fine-tuning.

Top Right position:

𖼖𖽺𖾐 𖼽𖽔𖾐 𖼚𖽑𖽡𖽝𖾐

Baseline position:

𖼈𖽺 𖼊𖽑𖽔 𖼳𖽘

Features for Latin

The Latin-script features shown above are Graphite copies of some of the OpenType features included in Adobe Source Sans Pro. You can enable them in LibreOffice/OpenOffice by using the following codes in the font field:

  • Miao Unicode:smcp=1 for small caps
  • Miao Unicode:c2sc=1 for all small caps, including numerals and some punctuation
  • Miao Unicode:onum=1 for old-style figures

All of the Miao and Latin features can be used in the testing section (if you are using Firefox).

Like Miao, the Lisu script is used primarily in the Yunnan province of China. It made sense to include Lisu in the Miao Unicode font as the two scripts are often associated. Further information on the Lisu script can be found on the Lisu page, which also links to the independent “Lisu Unicode” font. The Lisu support in Miao Unicode is identical, however; the only difference between the two fonts is that Lisu Unicode lacks Miao. (Miao adds considerably to the file size; Lisu does not.)

While Miao Unicode is fully functional for use, it is still in a phase of testing and development.

(You do not need to worry about future versions breaking compatibility, however. Documents created using this font will always display correctly with future versions of the font as well, as indeed they should display correctly with any font based on the Unicode implementation instructions.)

These are some of the issues which I am aware of:

  • Various workarounds have been employed to make the finals as legible as possible, including using smaller variants of the finals for above and below position. This has the side effect of giving a slightly inconsistent appearance.
  • The spacing, positioning and kerning need to be fine-tuned.
  • It is built on a compiled version of Adobe Source Sans Pro, rather than on its source. This does not appear to have any adverse effects (most information, including hinting instructions, is accurately retained), but it is clearly not ideal.
  • For some reason the OpenType style set names are interfering with the copyright field in the font, so that the copyright often displays as “straight l” or “slashed zero” instead of the intended message about the OFL license etc. I have not been able to ascertain why this is happening.

If you are able to offer advice or assistance with any of the above, please get in touch.

Of the points mentioned under “Known Issues”, I will hopefully be able to tackle the following in the coming months:

  • Adjust spacing and kerning.
  • Redraw some glyphs for smoother and more consistent outlines.

There are a few additional features which may be possible to develop in the more distant future:

  • Make a bold version? It is difficult to know how much expansion the finals (vowel signs) could handle.
  • Expand the Graphite programming to match more of the Latin-script OpenType features of Source Sans Pro?

Again, I would be happy to hear from you if you are interested in collaborating.

If you come across a problem, or have a question or suggestion, please file it on Github.

If you would like to let me know how you’re using the font, or discuss contributing to the project, you can reach me at phjamr@gmail.com.