Skip to content

Language Support

Mobile-Pretext handles text in any script that the platform's word segmenter and font engine support. No special configuration is needed — all languages work out of the box.

Tested Scripts

ScriptLanguagesSpecial handling
LatinEnglish, French, German, etc.Standard word-boundary breaking
HebrewHebrewRTL bidi levels
ArabicArabic, Urdu, FarsiRTL bidi levels, no-space punctuation rules
CJKChinese, Japanese, KoreanPer-character breaking, kinsoku shori
ThaiThaiDictionary-based word segmentation
DevanagariHindi, SanskritCombining mark handling
MyanmarBurmeseMedial glue rules
KhmerCambodianDictionary-based segmentation
LaoLaoDictionary-based segmentation
KoreanKoreanHangul syllable-level breaking
EmojiAll platformsCorrect ZWJ sequence widths

CJK Line Breaking

Chinese, Japanese, and Korean text uses per-character line breaking — each grapheme is a potential break point. This matches browser behavior.

Kinsoku Shori

Japanese/Chinese line-breaking rules prevent certain characters from appearing at line boundaries:

Line-start prohibited (can't start a line): 。、!:;?)」】>」」 and iteration marks ゝゞヽヾ々〻

Line-end prohibited (can't end a line): "(「【<「 and opening quotes "'«‹

Bidirectional Text

Mixed LTR/RTL text (e.g., English mixed with Hebrew or Arabic) gets bidi embedding levels computed via a simplified Unicode Bidi Algorithm. These levels are available on the PreparedTextWithSegments handle for custom rendering.

INFO

The line-breaking engine itself does not reorder text based on bidi levels — it breaks lines in logical order. Bidi levels are metadata for renderers that need to display text in visual order.

Emoji

All emoji are supported, including:

  • Basic emoji (😀, 🚀)
  • Emoji with variation selectors (❤️)
  • Skin tone modifiers (👋🏽)
  • ZWJ sequences (👨‍👩‍👧, 🏳️‍🌈)
  • Regional indicators / flag sequences (🇯🇵)

Each emoji grapheme cluster is measured as a single unit with correct width.

Copyright 2026 MaTriXy. All rights reserved. Released under the MIT License.