Technical Specification

Font Formats

Script Support

Flattype supports all actively used writing systems worldwide, including complex scripts with bidirectional text and contextual shaping.

Script Tag Script Name Region Est. Population
latn Latin Worldwide (Americas, Europe, Africa, Oceania, SE Asia) ~4-5 billion
hani Han (CJK ideographs) China, Taiwan, Japan, Singapore ~1.5 billion
arab Arabic Middle East, North Africa, South/Central Asia ~700 million-1 billion
dev2 Devanagari North/Central India, Nepal ~600 million
bng2 Bengali Bangladesh, West Bengal, Assam ~300 million
cyrl Cyrillic Russia, Eastern Europe, Central Asia ~250 million
kana Kana (Hiragana/Katakana) Japan ~125 million
tel2 Telugu Andhra Pradesh, Telangana (India) ~95 million
tml2 Tamil Tamil Nadu, Sri Lanka, Singapore, Malaysia ~85 million
hang Hangul South and North Korea ~80 million
thai Thai Thailand ~65 million
gjr2 Gujarati Gujarat (India) ~60 million
knd2 Kannada Karnataka (India) ~50 million
mym2 Myanmar Myanmar ~45 million
ory2 Odia Odisha (India) ~38 million
mlm2 Malayalam Kerala (India) ~38 million
ethi Ethiopic Ethiopia, Eritrea ~30-40 million
gur2 Gurmukhi Punjab (India), diaspora ~30 million
bopo Bopomofo Taiwan (phonetic annotation/input) ~23 million
sinh Sinhala Sri Lanka ~17 million
khmr Khmer Cambodia ~17 million
hebr Hebrew Israel, Jewish diaspora ~14 million
grek Greek Greece, Cyprus ~13 million
armn Armenian Armenia, diaspora ~10 million
lao Lao Laos, NE Thailand ~7 million
tibt Tibetan Tibet, Bhutan, Nepal, N India ~6 million
mong Mongolian Inner Mongolia (China), Mongolia ~5-6 million
olck Ol Chiki Jharkhand, West Bengal, Odisha (India) ~2-7 million (official for Santali)
geor Georgian Georgia ~4 million
tfng Tifinagh Morocco, Algeria, Tuareg Sahara ~1-5 million (taught in Morocco)
brai Braille Worldwide Millions
yi Yi (Nuosu) Sichuan, Yunnan (China) ~2 million
mtei Meetei Mayek Manipur (India) ~1.8 million (officially revived)
tavt Tai Viet NW Vietnam (Tai Dam/Tai Don) ~1 million
nko N'Ko Guinea, Mali, Cote d'Ivoire ~1 million and growing
syrc Syriac Iraq, Syria, Turkey, diaspora ~1 million (mostly liturgical)
copt Coptic Egypt (Coptic Church) <1 million (liturgical)
tale Tai Le Yunnan (China), Myanmar ~700,000
talu New Tai Lue Xishuangbanna (China), Laos, Myanmar ~550,000
plrd Miao (Pollard) Yunnan, Guizhou (China) ~500,000
lisu Lisu (Fraser) Yunnan (China), Myanmar ~500,000
cakm Chakma Chittagong Hill Tracts (Bangladesh), Tripura/Mizoram (India) ~150,000-700,000
thaa Thaana Maldives ~400,000
limb Limbu Eastern Nepal, Sikkim (India) ~300,000
cham Cham Vietnam, Cambodia ~100,000s (partly liturgical)
rohg Hanifi Rohingya Rakhine (Myanmar), Cox's Bazar (Bangladesh) ~100,000s and growing
adlm Adlam Guinea, West African Fulani communities ~100,000s and growing
vai Vai Liberia ~150,000
lana Tai Tham (Lanna) Northern Thailand, Laos, Myanmar ~100,000s (mostly liturgical)
kali Kayah Li Kayah State (Myanmar), Thailand ~100,000
cans Canadian Aboriginal Syllabics Northern Canada (Cree, Inuktitut, Ojibwe) ~100,000
java Javanese Java (Indonesia) School subject/ceremonial (~80M speakers)
sund Sundanese West Java (Indonesia) School subject/ceremonial (~40M speakers)
bali Balinese Bali (Indonesia) School/ceremonial (~3M speakers)
lepc Lepcha Sikkim (India), Nepal, Bhutan ~40,000
cher Cherokee Oklahoma, North Carolina (USA) ~20,000 (incl. learners)
mand Mandaic Iraq, Iran, diaspora ~10,000s (liturgical)
saur Saurashtra Tamil Nadu (India, Madurai) ~10,000s (~250k speakers)
sora Sora Sompeng Odisha, Andhra Pradesh (India) ~10,000s (~300k speakers)
wara Warang Citi Jharkhand, Odisha (India) ~10,000s (Ho: ~1.4M speakers)
gonm Masaram Gondi Madhya Pradesh, Maharashtra, Chhattisgarh (India) ~10,000s (Gondi: ~3M speakers)
tols Tolong Siki Jharkhand (India) ~10,000s (Kurukh: ~2M speakers)
gukh Gurung Khema Nepal, Sikkim (India) ~10,000s (official in Sikkim)
tnsa Tangsa Arunachal Pradesh (India), Myanmar ~10,000s
sunu Sunuwar Eastern Nepal, Sikkim (India) ~10,000s (official in Sikkim)
newa Newa (Prachalit) Kathmandu Valley (Nepal) ~10,000s (revival; ~800k speakers)
wcho Wancho Arunachal Pradesh (India) ~10,000s
onao Ol Onal West Bengal, Jharkhand (India) ~10,000s (Bhumij)
krai Kirat Rai Eastern Nepal, Sikkim (India) ~10,000s (Bantawa Rai)
hmnp Nyiakeng Puachue Hmong Laos, USA diaspora ~10,000s (church community)
nagm Nag Mundari Jharkhand (India) ~10,000s, growing (Mundari: ~1M speakers)
berf Beria Erfe Darfur (Sudan), Chad ~10,000s, growing (Zaghawa: ~500k speakers)
hano Hanunoo Mindoro (Philippines) ~13,000
buhd Buhid Mindoro (Philippines) ~8,000
sylo Syloti Nagri Sylhet (Bangladesh), UK diaspora Revival (Sylheti: ~10M speakers)
batk Batak North Sumatra (Indonesia) Ceremonial (~8M speakers)
bugi Buginese (Lontara) South Sulawesi (Indonesia) Ceremonial (~5M speakers)
tglg Tagalog (Baybayin) Philippines Revival/ceremonial
takr Takri Himachal Pradesh, Jammu (India) Revival/historical
hmng Pahawh Hmong Laos, Vietnam, USA diaspora Few thousand
bamu Bamum Cameroon (Foumban) Few thousand (revival)
gong Gunjala Gondi Adilabad, Telangana (India) Few thousand (revival)
tutg Tulu-Tigalari Coastal Karnataka (India) Few thousand (revival; Tulu: ~1.8M speakers)
pauc Pau Cin Hau Chin State (Myanmar) Few thousand (religious)
gara Garay Senegal (Wolof) Hundreds-thousands
toto Toto Totopara, West Bengal (India) ~1,600
tagb Tagbanwa Palawan (Philippines) <1,000 (nearly extinct)
samr Samaritan Israel/West Bank (Holon, Mt. Gerizim) ~900 (liturgical)
mend Mende Kikakui Sierra Leone ~500 (mostly displaced by Latin)
osge Osage Oklahoma (USA) Hundreds (revived 2006)
bass Bassa Vah Liberia Hundreds (revival)
medf Medefaidrin Akwa Ibom (Nigeria) Hundreds (church community)
rjng Rejang SW Sumatra (Indonesia) Nearly extinct (~350k speakers)
runr Runic Scandinavia (historical) Historical/scholarly
goth Gothic Historical (Europe) Extinct/scholarly

OpenType Features

Flattype runs the standard OpenType shaping pipeline: an ordered series of glyph-substitution (GSUB) stages, followed by a single positioning (GPOS) pass. The substitution stages it applies are:

Stage Features
Preprocessing / default GSUB rvrn, ccmp, locl, rtlm, rtla, calt, rclt, rlig, liga, clig, mset
Joining scripts (Arabic, Syriac, N'Ko, Mongolian…) isol, init, medi, fina, stch
Indic basic forms nukt, akhn, rphf, pref, rkrf, abvf, blwf, half, pstf, vatu, cjct, cfar
Indic / SE-Asian presentation pres, abvs, blws, psts, haln
Hangul ljmo, vjmo, tjmo
Positioning / GPOS curs, dist, kern, abvm, blwm, mark, mkmk

The exact staging is per-script. Arabic, for instance, pauses between rlig and calt the way Uniscribe does, while Universal Shaping Engine scripts run locl, ccmp, nukt, and akhn together in one lookup-index-sorted batch. On top of this, any optional feature the font exposes — small caps (smcp), stylistic sets (ss01…), fractions (frac), and the like — is applied when requested.

JavaScript Version

Pure JavaScript implementation for browser and Node.js environments.

Rust Version

Native Rust crate for high-performance text rendering.

Reliability

Limitations