Kwark. Design System
Open Kwark

Writing systems

How Kwark writes a screenplay in more than one language and script: the four language modes, phonetic typing on an English keyboard, fonts per script, right-to-left lines, print and PDF limits, numerals, case and sorting.

Foundations

INT. EDIT SUITE – NIGHT

Mira scrubs back. Selvi watches from the door.

SELVI

நான் இங்கே இருக்கேன்.

MIRA

क्या हाल है?

Where Kwark stands

A film’s script is often in more than one language. Action and scene headings in English, a grandmother who speaks only Tamil, a hero who switches to Hindi when he is angry, an Urdu song. Kwark is built so a writer can type all of that on the keyboard they already have, keep the screenplay’s format exact, and print it.

There are two states to keep apart, and this page labels them:

What it covers Where
Languages 31 screenplay languages in 19 script families (Decision 0046), including Hindi, Marathi, Bengali, Tamil, Telugu, Kannada, Malayalam, Urdu, Arabic, Japanese and Korean kwark.space
How they are typed Four language modes, phonetic typing on an English keyboard with a candidate strip under the caret, per character or per line kwark.space
How they are set and printed A Noto font role per script, right-to-left lines, and print routing for every complex script kwark.space

Never tell a person a language is supported until it is on kwark.space.

The interface stays in English. Decision 0046 localises the screenplay, not the menus: translating the editor’s chrome into every language was ruled out of scope, so menus stay calm and consistent. Write interface strings so they can be translated later (whole sentences, nothing stitched together, room to grow by half).

The four language modes

Decision 0046 stores a scriptLanguage setting on the project (ScriptLanguageConfig in types/index.ts), beside the per-character languages it already had (scriptCastLanguages). It offers two primary modes and four workflows, set in Settings › Language.

Mode mode What the writer sees in Settings Who it is for
Whole film in one language single Every scene heading, action line, cue, and speech is written in one language. A Tamil film written in Tamil
Movie + dialogue split split Write action, scenes, and cues in one language (e.g. English) and all dialogue in another (e.g. Hindi). The common Indian working script
By character by-character Write the movie in one base language and assign each character their own spoken language. A family drama in three languages
Fluid fluid Switch language on the fly at any line with the language pill or shortcut. Code-switching dialogue

How a line’s language is decided (resolveBlockLanguage() in utils/scriptLanguages.ts), in order:

  1. A language set on the line itself (attrs.lang) wins.
  2. In single, everything is the film’s language.
  3. In the mixed modes, only spoken blocks (dialogue, parenthetical, lyrics) change. They take the speaking character’s language if one is set; in split, otherwise the dialogue language.
  4. Everything else (scene headings, action, cues, transitions) is the film’s language.

A project made before modes existed opens as by-character if it already had character languages, and single otherwise. Nothing a writer typed is reinterpreted.

Switching as you go. In the screenplay’s bottom bar, a language pill shows the language and mode the caret is writing in and opens a quick switcher. ⌥⌘L (Ctrl+Alt+L) opens it from the keyboard. On a speech, a small chip shows the line’s script (Aa for English, the script’s own mark otherwise) and sets the speaker’s or the line’s language; Only this line keeps the change to one line.

Typing a script on an English keyboard

Most Indian writers type Hindi the way they text it: kya haal hai. Kwark meets that habit.

  • The Roman word being typed shows in the line’s script in a candidate strip just under the caret.
  • Space, a punctuation mark or Enter writes in the first candidate.
  • ↑ ↓ or a click picks another; candidates are numbered when there is more than one.
  • Esc keeps that word in Roman letters (a brand name, an English word in a Hindi line).
  • Enter and Tab keep their screenplay meaning. The word is written in first, then Enter moves to the next element.

The phonetic scheme in the shipped build: a, aa or A, i, ii or ee or I, u, uu or oo or U, e, E or ae, ai, o, O, au; capitals for the retroflex T D N L and for R; sh, Sh, ch, chh, kh, gh, jh, th, dh, ph, bh; zh for ழ; M for the nasal dot, H for visarga; x for ksh. In the south a plain e and o are the short vowels. A Hindi word ending in a after a consonant is written with a long a, because kya, tha and accha are said that way.

Accuracy. A fixed table writes main as मैन when the writer means मैं. Kwark fixes this with a curated lexicon of everyday dialogue words ranked first (मैं before मैन, में, है, हैं), then established open-source engines (indic-transliterator, @indic-transliteration/sanscript, wanakana for Japanese, es-hangul for Korean, transliteration), with eld for language detection.

Privacy. Everything above runs on the device. Nothing the writer types leaves it. A separate switch, Smart phonetic suggestions, asks an online dictionary input service for better candidates; it is off by default, and Settings says so in plain words: nothing you type leaves your device unless you enable this. Results are normalised to NFC and the offline engines take over if the service does not answer.

The phone’s own keyboard. A writer using Gboard’s Tamil keyboard or the macOS Hindi input is already typing the script. While the operating system’s input method is composing, Kwark steps aside completely, so nothing is converted twice.

The strip never moves the page. The candidate strip must be zero width in the line’s flow, so it never moves a line or a page break while the writer types. Any change to the strip’s styles must be checked against this rule before release: padding or a margin in the flow breaks it.

  • Must keep phonetic typing and every candidate source on the device unless the writer has turned on Smart phonetic suggestions.
  • Must let Esc keep a word in Roman letters, and never convert a word the writer kept.
  • Must step aside while an operating-system input method is composing.
  • Never let a typing aid change line breaks, page breaks or the page count.

The 31 languages

Decision 0046’s list, grouped as the picker groups them. Phonetic means Roman letters on an English keyboard convert to the script.

Group Languages Script family Phonetic
Common English Latin no
Indian Hindi, Marathi, Nepali, Sanskrit Devanagari yes
Indian Bengali · Tamil · Telugu · Kannada · Malayalam · Gujarati · Punjabi · Odia · Sinhala Their own scripts (Gurmukhi for Punjabi) yes
Indian Urdu Arabic, right to left yes
Middle East Arabic, Persian Arabic, right to left yes
Middle East Hebrew Hebrew, right to left yes
East and South-East Asia Japanese · Chinese (Pinyin) · Korean Japanese, Chinese, Korean yes
East and South-East Asia Thai Thai no
European Spanish, French, German, Italian, Portuguese, Turkish Latin no
European Russian, Ukrainian Cyrillic yes
European Greek Greek yes

Screenplay conventions in other languages

With Localised scene prefixes & transitions on (only offered in the whole-film mode, for a language other than English), the editor also recognises the film language’s own conventions. English INT., EXT., INT./EXT. and I/E. are always recognised as well, so a script stays portable.

Language Scene prefixes A transition Continued
Hindi अं. · बा. · अंदर. · बाहर. कट टू:
Tamil உள். · வெளி. கட் டு:
Urdu اندر. · باہر. کٹ ٹو: جاری
French INT. · EXT. COUPE À : SUITE
German INNEN. · AUSSEN. SCHNITT AUF: FORTSETZUNG
Korean 실내. · 실외. · S# 컷 투: 계속

French keeps its space before the colon (COUPE À :), as French typography does. Copy these from utils/scriptLanguages.ts; never translate a convention yourself.

Fonts for each script

Courier Prime has no Indian, Arabic or East Asian letters. Decision 0046 adds a font role per script family. Each keeps the screenplay face first, so Latin stays monospaced and on the grid, and lets Noto shape the script.

Token Falls back to Languages
--k-font-script-devanagari Noto Sans Devanagari Hindi, Marathi, Nepali, Sanskrit
--k-font-script-bengali Noto Sans Bengali Bengali
--k-font-script-tamil Noto Sans Tamil Tamil
--k-font-script-telugu Noto Sans Telugu Telugu
--k-font-script-kannada Noto Sans Kannada Kannada
--k-font-script-malayalam Noto Sans Malayalam Malayalam
--k-font-script-gujarati Noto Sans Gujarati Gujarati
--k-font-script-gurmukhi Noto Sans Gurmukhi Punjabi
--k-font-script-odia Noto Sans Oriya Odia
--k-font-script-sinhala Noto Sans Sinhala Sinhala
--k-font-script-urdu Noto Nastaliq Urdu, then Noto Sans Arabic Urdu
--k-font-script-arabic Noto Sans Arabic Arabic, Persian
--k-font-script-hebrew Noto Sans Hebrew Hebrew
--k-font-script-jp · -sc · -kr Noto Sans JP · SC · KR Japanese, Chinese, Korean
--k-font-script-thai Noto Sans Thai Thai

Every token is var(--k-font-screenplay), 'Noto Sans …', sans-serif. The editor picks one by the line’s lang attribute, so a font is chosen by the language, never guessed from the text. Fonts load by Unicode range: a writer who never types Tamil never downloads it, which matters on a metered phone.

On kwark.space, a writer can also set the whole script in Noto Sans Mono + Devanagari. The app is honest about its limit: Devanagari has no monospace tradition, so lines of it are measured as Latin and may run a little long.

Interface type. Poppins, the interface face, draws Devanagari as well as Latin. Raleway, the display face, does not, so a project title in Hindi falls back to the device’s font in headings. Any heading that can hold a person’s own words must be checked with a Hindi and a Tamil title.

Line height and the marks above and below

Indian scripts stand taller than Latin: vowel signs (matras) sit above the headline and below the base, and conjuncts stack. Urdu’s Nastaliq slopes and stacks further.

  • In print, Indian-script lines are set a tenth smaller than the Courier line, so their vowel signs clear the line above while the page keeps six lines to the inch.
  • Urdu lines take a line height of 1.9 on screen.
  • In the interface, any text that can hold a person’s words keeps a line height of at least 1.5 and is never clipped: no overflow: hidden with a tight height on a title, a chip or a card.
  • Truncate by grapheme, not by character. Cutting क्ष after its first code point leaves a broken letter. Use Intl.Segmenter with granularity: 'grapheme', or CSS text-overflow: ellipsis on a single line, never slice().

Page count

A screenplay’s page count rests on Courier: every character 0.6 em wide, ten to the inch at 12pt, six lines to the inch. Kwark measures Indian-script lines as if they were Latin, so a page heavy with Devanagari may run a little long. Say so where a writer reads the count of a non-Latin script; never present it as exact.

Right to left

Urdu, Arabic, Persian and Hebrew are written right to left.

  • On kwark.space: not supported. The editor does not set a direction per line.
  • Each block gets lang and dir (rtl for ur, ar, fa, he), unicode-bidi: plaintext so English words inside an Urdu line keep their own order, and right-aligned text. Cues and parentheticals stay centred; a right-to-left transition sits on the left. The print preview mirrors the same rules.
  • The page itself stays left to right. The screenplay’s margins, scene numbers and page furniture are the format’s, not the language’s.

Rules for anything else that shows a person’s words:

  • Must use logical CSS properties (margin-inline-start, padding-inline-end, text-align: start) so a line can flip.
  • Must set dir="auto" on user text in lists, cards and titles.
  • Never mirror icons that are not directional (a clock, a camera). Mirror only arrows that mean back and forward.
  • The interface itself is not mirrored. A right-to-left interface is not planned.

Bilingual scripts and the people who read them

  • Translations. Any dialogue line can carry a translation. It shows under the line, is set to the dialogue width, and can be printed as an appendix.
  • Romanised lines. An actor who speaks Hindi but does not read Devanagari can switch the Reader to show those lines in Roman letters, the way Hindi is written in a text message (kya haal hai), not a scholar’s transliteration. The same switch works for the other scripts Kwark supports.
  • Table reads. A line is handed to a voice that can read it: romanised Hindi goes to a Hindi voice as Devanagari, and Devanagari handed to an English voice is romanised first.
  • Spellcheck is language-aware: it never flags a Tamil or Hindi word as an English typo.

Kwark’s built-in PDF writer (jsPDF with its standard Courier) can only print Western European Latin text, and it cannot shape Indian scripts (conjuncts, vowel signs that come before the consonant) even with a font embedded. So:

Script contains Exported through Notes
Only Latin in the Windows-1252 set (English, French, Spanish, German without ẞ) jsPDF Fast, selectable text
Any Indian script (kwark.space) The export preview’s own pages, printed with the browser’s Save as PDF Text is real and correctly shaped. Notes, alternates and translation appendices are left out of that copy, and the export dialog says so
Greek, Cyrillic, Hebrew, Arabic, Indian, Sinhala, Thai, Chinese, Japanese, Korean The same browser route Right-to-left lines print right to left

Known gaps.

  • Turkish ş ğ ı İ and German capital ẞ (in the AUẞEN. prefix) are outside both the Windows-1252 set and the routing check, so they would go to jsPDF and print wrongly.
  • The print face lists Noto for Devanagari, Arabic, Urdu, Tamil, Bengali, Japanese, Chinese and Korean only. Telugu, Kannada, Malayalam, Gujarati, Punjabi, Odia, Sinhala, Hebrew and Thai lines fall back to whatever font the device has.

Case, numerals, dates and sorting

Capitals. Scene headings, cues and transitions are capitalised by convention. Only scripts with case (Latin, Cyrillic, Greek) have capitals; Devanagari, Tamil, Arabic and Chinese do not, so a cue in Tamil is written as typed. Uppercase with the line’s language: toLocaleUpperCase('tr') turns iç into İÇ, plain toUpperCase() gives the wrong IÇ. The current print code uses plain toUpperCase(); that is a known gap for Turkish.

Numerals. Scene numbers (12, 12A) and page numbers are written in Western digits in every language, because a crew’s paperwork and a production’s software match on them. A writer may type Devanagari digits (०–९) in their own text; Kwark keeps them as typed and romanises them for an actor.

Money and dates. Money follows the currency’s own people: ₹12,50,000 for rupees (Intl.NumberFormat('en-IN')). Dates follow the device’s locale. For crews, write the weekday with the date. See Content.

Sorting. Sort people’s words with localeCompare, as the World view does (base sensitivity, numeric), so Scene 2 comes before Scene 10 and accents do not split a name. Some lists (the cast roster) still use a plain localeCompare; move them over when touched. Scene order is the script’s order and is never alphabetical.

Search. Compare text in NFC (the romaniser already normalises to NFC), so a word typed on one keyboard finds the same word typed on another.

Pick the font by the line’s lang (--k-font-script-tamil for a Tamil line) and keep var(--k-font-screenplay) first.

Do

Guess the script from the characters, or set a whole script in one Noto face so Latin loses its monospaced grid.

Don’t

Say that Indian-script scripts print through Save as PDF, and which appendices are left out.

Do

Embed a Noto font in jsPDF and call it done; the letters will be there and the words will be wrong.

Don’t

Keep the interface in English and make the screenplay speak the writer’s languages.

Do

Half-translate the menus, or put a language picker in front of a writer who only writes English.

Don’t
  • Must set lang (and dir where right to left) on every rendered line that has a language, on screen and in print.
  • Must choose fonts through the --k-font-script-* role for the line’s language, with the screenplay face first.
  • Must route any text outside the Windows-1252 set to the browser print path, and say what that path leaves out.
  • Must uppercase with the line’s locale, and truncate by grapheme.
  • Must name only languages that kwark.space supports today when telling a person what Kwark can do.
  • Never send typed text to an online service unless Smart phonetic suggestions is on.
  • Never let a language feature change the page’s geometry or line breaks.

AI readiness test

Task. Add a “Character list” print sheet for Blank Pages that shows each character’s name, spoken language and first scene.

Give the agent. This page, decision 0046, utils/scriptLanguages.ts, Print and export.

Constraint. Names may be in Tamil, Hindi or Urdu; the sheet must print correctly and keep the interface in English.

A reliable answer

  • Each name carries its lang and dir, and right-to-left names flow right to left
  • Fonts from --k-font-script-* with fallbacks
  • Any complex script prints through the browser print path, and the sheet says so
  • Sorted with localeCompare, scene numbers in Western digits
  • No text sent to an online service

Give this Markdown to your coding agent or share its URL.

Open .mdllms.txt
Loading…