https://github.com/moh3n9595/persian-figlet
A Figlet-style ASCII art renderer for Persian (Farsi) text with full contextual character shaping and RTL support.
https://github.com/moh3n9595/persian-figlet
ascii-art farsi figlet persian unicode
Last synced: 11 days ago
JSON representation
A Figlet-style ASCII art renderer for Persian (Farsi) text with full contextual character shaping and RTL support.
- Host: GitHub
- URL: https://github.com/moh3n9595/persian-figlet
- Owner: moh3n9595
- License: mit
- Created: 2025-07-15T07:44:36.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-21T13:43:42.000Z (3 months ago)
- Last Synced: 2025-09-29T13:16:11.751Z (17 days ago)
- Topics: ascii-art, farsi, figlet, persian, unicode
- Language: TypeScript
- Homepage: https://persian-figlet.vercel.app
- Size: 1.5 MB
- Stars: 8
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![]()
Persian Figlet
A Figlet-style ASCII art renderer for Persian (Farsi) text with full contextual character shaping and RTL support.
 
[](https://codecov.io/gh/moh3n9595/persian-figlet) [](https://www.codefactor.io/repository/github/moh3n9595/persian-figlet)
[](https://www.npmjs.com/package/persian-figlet)
[](https://bundlephobia.com/result?p=persian-figlet@latest)
[](https://GitHub.com/moh3n9595/persian-figlet/contributors/)
[](https://github.com/moh3n9595/persian-figlet/blob/master/LICENSE)
[](https://github.com/moh3n9595/persian-figlet/compare)
[](https://github.com/prettier/prettier)
[](https://eslint.org/)
[](https://www.typescriptlang.org/)## 🌐 Try it Online
**[🚀 Live Demo - Persian Figlet Web Tool](https://persian-figlet.vercel.app)**
Experience Persian Figlet directly in your browser with our interactive web tool.
## ✨ Features
- 💻 **CLI Tool**: Command-line interface for terminal usage with colors and file output
- 🎨 **Multiple Font Styles**: Standard and Slim fonts with distinct visual characteristics
- 🔤 **Complete Persian Support**: All Persian chars with proper contextual forms
- ↔️ **Kerning System**: Intelligent character spacing with overlap support for authentic Persian typography
- 🔗 **Smart Char Connection**: Automatic handling of char joining rules
- 📝 **TypeScript Support**: Full type definitions and IntelliSense support
- 🎯 **Easy to Use**: Simple API with sensible defaults
- 🧪 **Well Tested**: Comprehensive test coverage
- 📦 **Zero Dependencies**: Lightweight and self-contained## ⚙️ Installation
```bash
npm install persian-figlet
``````bash
yarn add persian-figlet
```## 📖 Usage
### Command Line Interface (CLI)
#### Basic Usage
```bash
# Basic text conversion
persian-figlet "سلام دنیا"
```#### Advanced CLI Options
```bash
# With colors
persian-figlet "تست" --color red
persian-figlet "فارسی" -c blue# Font selection
persian-figlet "متن" --font standard
persian-figlet "نمونه" -f standard# Output to file
persian-figlet "ذخیره" --output output.txt
persian-figlet "فایل" -o result.txt# List available fonts
persian-figlet --list-fonts# Show library information
persian-figlet --info
```#### CLI Colors
Available colors: `red`, `green`, `blue`, `yellow`, `magenta`, `cyan`, `white`#### Pipe Usage
```bash
# Using with pipes
echo "پایپ" | xargs persian-figlet
persian-figlet "رنگی" -c green | less# Save colored output
persian-figlet "رنگی" -c red > colored-output.txt
```#### CLI Help
```bash
persian-figlet --help
persian-figlet -v # version
```### JavaScript/TypeScript Library
#### Basic Usage
```typescript
import { print, FontStyle } from 'persian-figlet';// Basic usage with default font
print('سلام دنیا');// Using different fonts
print('سلام دنیا', { font: FontStyle.STANDARD });// Silent mode (no console output)
const result = print('سلام دنیا', { silent: true });
console.log(result);
```### Example Output
```
print('تست');
```Will output beautiful ASCII art representation of the Persian text "تست".
```
█ █ █ █
█ █ █ █ █ █
████████████████████████████
```## 🚀 Roadmap & Future Work
1. **Add & Create More Fonts**
- Design “Slim”, “Rounded” or “Shadow” variations
- Allow community‑contributed font packs via a simple JSON schema2. **Ligature & Diacritic Support**
- Render optional diacritics above/below base chars
3. **Interactive Playground & Live Preview**
- Web demo to type in Persian and see instant Figlet output
- Let users tweak spacing, font, and colors in real time## 🙋 Contributing
For help on setting up the repo locally, building, testing, and contributing
please see [CONTRIBUTING.md](https://github.com/moh3n9595/persian-figlet/blob/master/CONTRIBUTING.md).## 🧑💻 Code of Conduct
All developers who wish to contribute through code or issues, take a look at the
[CODE_OF_CONDUCT.md](https://github.com/moh3n9595/persian-figlet/blob/master/CODE_OF_CONDUCT.md).## 📃 License
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/moh3n9595/persian-figlet/blob/master/LICENSE) file for details.
## 🙏 Acknowledgments
- Inspired by the classic Figlet tool
- Built with love for the Persian language community