Seamless automatic Right-to-Left (RTL) & Bidirectional text formatting for Google Antigravity
English • فارسی (Persian) • العربية (Arabic) • اردو (Urdu)
By default, Google Antigravity renders all conversational output, prompts, and markdown lists using standard Left-to-Right (LTR) orientation. When reading or writing in Right-to-Left languages such as Persian (فارسی), Arabic (العربية), Urdu (اردو), or Hebrew (עברית):
- Punctuation marks (periods, colons, parentheses) appear misplaced at the wrong side of the line.
- List bullet points and numbered lists remain awkwardly anchored to the left.
- Sentences mixing English keywords (like model names or code identifiers) become jumbled.
Antigravity RTL solves this fundamentally by injecting a smart CSS & Preload patch directly into the application runtime, enabling Chromium's native unicode-bidi: plaintext engine for real-time, auto-detected RTL and LTR text formatting.
| ❌ Before Patch (Default LTR) | ✅ After Patch (Antigravity RTL) |
|---|---|
| • Persian/Arabic text forced to the left | • Automatic Right-to-Left (RTL) alignment |
| • Bullet points awkwardly anchored to left | • Bullet points & numbers naturally positioned on the right |
| • Misplaced punctuation (periods, colons, brackets) | • Proper punctuation placement at the natural end of lines |
| • Disrupted mixed English & Persian sentences | • Flawless inline English & code keywords |
- ⚡ 100% Real-Time & Automatic: Directionality is computed on the fly as the model streams words. Paragraphs starting with RTL characters align to the right, while English paragraphs stay left.
- 💻 Strict Code Block Isolation: Inline code (
code), multi-line code blocks (pre), Monaco editor, and terminal outputs are strictly preserved in Left-to-Right (LTR) with standard monospace typography. - ✍️ User Input Alignment: As you type prompts in the input box, text direction automatically adjusts according to the language you are writing.
- 🔤 Enhanced Persian/Arabic Typography: Includes fallback styling for modern RTL fonts (
Vazirmatn,Segoe UI,Tahoma) for enhanced readability. - 🛠️ DevTools Shortcut Enabled: Adds
Ctrl + Shift + Ishortcut to easily inspect elements and toggle Developer Tools. - 🛡️ Zero Risk & Instant Rollback: An automatic backup (
app.asar.backup) is created before applying any changes. You can restore original factory settings with a single click.
- Download the latest release from the Releases Page (or clone this repository).
- Extract the downloaded archive.
- Double-click
apply-patch.bat. - The patcher will safely close Antigravity, create a backup, apply the patch, and relaunch Antigravity with full RTL support.
If you ever wish to revert Antigravity back to its original default state:
- Double-click
restore-original.bat. - The script restores the factory
app.asar.backupand relaunches the app.
If Google Antigravity receives a major application update in the future that overwrites the core bundle, you can dynamically unpack, patch, and repack the new version using PowerShell:
# Run with PowerShell
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\scripts\auto-patch-script.ps1Requirements for dynamic script: Node.js / npx installed on your machine.
Antigravity 2.0 is built on the Electron / Chromium architecture. The application package (app.asar) contains a dist/preload.js script that executes in every BrowserWindow before DOM rendering.
This patch hooks into preload.js and applies:
unicode-bidi: plaintext !important; text-align: start !important;to message containers, paragraphs, headers, and inputs.- Dynamic
dir="auto"attribute injection across dynamic markdown DOM mutations (using aMutationObserver). - Explicit
direction: ltr !important; unicode-bidi: isolate !important;isolation for allpre,code, tables, and terminal containers.
By default, the Electron renderer in Google Antigravity lacks native dir="auto" or unicode-bidi: plaintext rules on its message markdown containers. As a result, all paragraphs default to the standard Chromium Left-to-Right (LTR) orientation.
The patch injects modern CSS rules into Antigravity's preload script. This enables Chromium's native bidirectional algorithm to inspect the first character of each paragraph: if it's an RTL character (Persian, Arabic, Urdu, Hebrew), the paragraph instantly aligns right with proper punctuation and bullet points; if it's Latin, it remains left-aligned.
No. All <pre>, <code>, Monaco editor, and terminal elements are explicitly isolated with direction: ltr !important; text-align: left !important; unicode-bidi: isolate !important;. Your code indentation and syntax highlighting remain completely untouched.
Click to expand search keywords and indexed topics
google antigravity rtl • antigravity right to left • antigravity persian font • antigravity farsi • antigravity arabic fix • antigravity urdu support • antigravity hebrew • antigravity bidi patch • google antigravity text direction • antigravity electron asar patch • fix rtl in antigravity ide • antigravity ide persian support • antigravity chat right to left • antigravity markdown rtl • vazirmatn font antigravity • راست چین کردن آنتی گرویتی • حل مشکل چپ چین بودن در آنتی گرویتی • فارسی نویسی در گوگل آنتی گرویتی • پچ راست چین آنتی گرویتی • فونت فارسی در Antigravity • حل مشکل به هم ریختگی فونت فارسی در antigravity • محاذاة النص العربي في google antigravity • حل مشكلة اتجاه النص في antigravity • تعريب جوجل آنتی جرافيتي • اینٹی گریویٹی اردو سپورٹ
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License.
