UniText
Professional Unicode text rendering for Unity with full RTL support, HarfBuzz shaping, and extensible markup system.
media.lightside.unitext Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/unitext.git README Markdown
Copy this to your project's README.md
## Installation
Add **UniText** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/unitext.git
```
[](https://www.pkglnk.dev/pkg/unitext)Dependencies (2)
README
UniText
π UniText 2.0 β Coming Soon. The biggest update since the initial release β rewritten from scratch.
See what's new in 2.0
π¨ No more materials. UniTextAppearance is gone. Effects are configured directly on components and can target individual parts of the text.
π€ Variable Fonts. Full axis support β weight, width, italic, slant, optical size β controllable per-character. Three-tier resolution: variable axes β static faces β synthesis. Same algorithm as CSS. No other game engine has this (except Godot).
β‘ SDF & MSDF rendering from raw curves. Runtime BΓ©zier rasterization via Burst. No pre-baked atlases. A single global Texture2DArray: 1 draw call instead of N, automatic LRU eviction, adaptive tile sizes by glyph complexity, defragmentation.
π¨βπ©βπ§βπ¦ Font Families. Primary + faces (bold, italic, light). CSS Β§5.2 weight matching β same algorithm browsers use. Redesigned UniTextFontStack.
π UniTextWorld. 3D text without Canvas. Full pipeline (Unicode, BiDi, shaping, effects, emoji, fallback) via MeshRenderer.
β¨ Effects. Outline and shadow with per-character control. Multi-pass rendering. Works in Canvas and World.
π SmallCaps. Native OpenType smcp via HarfBuzz. Proper glyphs when available, automatic synthesis when not.
πΉπ Thai & Lao word segmentation. Dictionary-based word breaking (26K Thai words). Correct line breaks for SE Asian scripts.
π¦ Zstd font compression. ~2.7x smaller builds for Latin/Arabic, ~1.3x for CJK. ~600 MB/s desktop, ~175 MB/s mobile.
π Markdown. **bold**, *italic*, ~~strikethrough~~, ++underline++ β out of the box.
π οΈ Editor UX. Style selector with ~30 presets and search. Font family inspector. Glyph picker with live preview. Atlas preview tabs. Styles & Style Presets.
π ...and a mountain of fixes. Full changelog and migration notes included with the release.
β οΈ Major version bump β expect breaking changes from 1.x.
Industrial-grade Unicode 17.0 text engine for Unity. Built on HarfBuzz β the same shaping engine used by Chrome, Firefox, Adobe InDesign, and Android.
Passes all 891,757 official Unicode conformance tests. Zero GC allocations at runtime. 3-21x faster than TextMeshPro.
β¨ Key Features
- π 150+ languages β Arabic, Hebrew, Hindi, Thai, CJK, and every other Unicode script. One component, automatic font fallback
- π Full BiDi β mixed LTR/RTL with numbers and punctuation renders correctly (UAX #9)
- π Native color emoji β ZWJ sequences, skin tones, flags via system fonts. Zero extra build size
- β‘ SDF & MSDF rendering β curve-based Burst-compiled glyph rasterization. Shared Texture2DArray atlas with adaptive tile sizes, reference counting, and LRU eviction
- π€ Font Families β CSS Β§5.2 weight matching, variable font axes (wght, wdth, ital, slnt, opsz), three-tier resolution: variable axes β static faces β synthesis
- π¨ Effects β outline and shadow via multi-pass SDF rendering.
<outline>,<shadow>tags with color, dilate, offset, softness - π·οΈ Extensible markup β 30+ modifier presets, Markdown support (
**bold**,*italic*), custom parse rules, shared configurations - π Interactive text β clickable/hoverable regions with typed events and highlight system
- πΉπ Word segmentation β dictionary-based word breaking for Thai, Lao, Khmer, Myanmar (SE Asian scripts without spaces)
- π Zero allocations β custom pooling, parallel processing, 3-21x faster than TextMeshPro
π¦ Installation
Unity Package Manager (Git URL)
- β οΈIf you have a previous version of UniText installed, remove it first via Window β Package Manager before installing 2.0.0. This is a major update and cannot be installed over the previous version.
- Open Window > Package Manager
- Click + > Add package from git URL...
- Enter:
https://github.com/LightSideMeowshop/unitext.git#2.0.0
π Quick Start
- Select any GameObject with RectTransform
- Add Component > UniText
- Type text β it works. Any language, any direction.
var uniText = gameObject.AddComponent<UniText>();
uniText.FontStack = myFontStack;
uniText.Text = "Hello, World!";
uniText.Text = "Ω
Ψ±ΨΨ¨Ψ§ Ψ¨Ψ§ΩΨΉΨ§ΩΩ
"; // Arabic
uniText.Text = "Mixed: Hello Χ’ΧΧΧ World"; // BiDi
uniText.Text = "π¨βπ©βπ§βπ¦π―π΅"; // Emoji
β‘ Performance
Android production build, 100 objects x 2300 chars:
| Benchmark | vs TextMeshPro | vs UI Toolkit |
|---|---|---|
| Object creation | 3.4x faster | 4.9x faster |
| Full rebuild | 2.9x faster | 5.4x faster |
| Layout | 20.7x faster | 3.4x faster |
| Mesh rebuild | 7.1x faster | 2.4x faster |
- π§Ή Zero GC allocations at runtime β custom pooling with 95%+ hit rate
- π§΅ Multi-threaded parallel text processing
- βοΈ FreeType glyph rendering: 4.7-15.2x faster than Unity FontEngine
π₯οΈ Supported Platforms
| Platform | Architectures |
|---|---|
| Windows | x86, x64, ARM64 |
| macOS | x64, Apple Silicon |
| Linux | x64 |
| Android | ARMv7, ARM64, x86, x64 |
| iOS | ARM64 |
| WebGL | 2.0 |
π Requirements
- Unity 2021 LTS or newer
π Documentation
π¬ Support
βοΈ License
UniText is source-available under the PolyForm Noncommercial License 1.0.0.
- Free for personal projects, learning, research, game jams, open-source, education, and non-profits.
- Commercial use (games, apps, tools that generate revenue) requires a commercial license.
Contact: unity@lightside.media β we respond quickly and licensing is straightforward.
π Third-Party Software
UniText includes the following open-source libraries in its native plugin. See Third-Party Notices.txt for full license texts.
- HarfBuzz (Old MIT License) β text shaping engine
- FreeType (FreeType License) β font rasterization. Portions of this software are copyright (c) The FreeType Project (https://freetype.org). All rights reserved.
- Blend2D (Zlib License) β 2D vector rasterization
- Zstandard (BSD-3-Clause License) β data compression
- zlib (Zlib License) β general-purpose compression
- libpng (PNG Reference Library License) β PNG decoding
Default fonts (Noto Sans, Noto Sans Arabic, Noto Sans Hebrew) are licensed under the SIL Open Font License v1.1.
Thai word segmentation dictionary is derived from ICU and licensed under the Unicode License V3.
No comments yet. Be the first!