Download the PHP package afaztech/glyphify without Composer
On this page you can find all versions of the php package afaztech/glyphify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download afaztech/glyphify
More information about afaztech/glyphify
Files in afaztech/glyphify
Package glyphify
Short Description A PHP font generator supporting Persian and Latin scripts with 100+ unique font styles
License MIT
Informations about the package glyphify
Glyphify
PHP font generator supporting Persian and Latin with 50+ unique font styles.
Overview
Glyphify is a comprehensive text styling library that transforms ordinary text into various Unicode-based font styles. It supports both Persian and Latin scripts, offering over 50 different font mappings including mathematical symbols, decorative styles, and specialized Persian fonts. Perfect for social media posts, creative writing, and any application requiring styled text.
If this project is helpful to you, you may wish to give it a:star2: to support future updates and feature additions!
AI-Assisted Development
For everything you need to know about the project, including AI-assisted ("vibe") coding, give the glyphify.txt file to your AI assistant. This file provides comprehensive context and documentation to help LLMs understand the project, its architecture, conventions, and codebase.
Table of Contents
- Features
- Requirements
- Installation
- Usage
- Contributing
- License
Features
- Multi-script Support: Fully supports Persian (Arabic script) and Latin text
- 50+ Font Styles: Includes bold, italic, circled, squared, fraktur, script, and more
- Persian Specialization: Dedicated Persian fonts with proper character mapping and contextual forms
- Smart Text Detection: Automatically detects Persian, English, or mixed text
- Finglish Transliteration: Converts Persian text to Finglish (Persian in Latin script)
- Flexible Output: Generate styled text as array, JSON, or CSV
- Configurable Options: Control Persian, Latin, Finglish, and all-fonts modes
- Lightweight: No external dependencies, pure PHP implementation
Requirements
- PHP 7.4 or higher
- JSON extension (enabled by default)
- Multibyte string support (PHP's mbstring extension)
Installation
Install via Composer:
Or clone the repository directly:
Usage
Basic Usage
Configuration Options
Output Formats
Methods
| Method | Description |
|---|---|
generate(?string $fontName = null): array |
Generate styled text. If font name provided, returns only that font |
getArray(): array |
Returns the last generated output array |
toJson(?string $fontName = null): string |
Returns output as JSON |
toCsv(?string $fontName = null): string |
Returns output as CSV |
display(?string $fontName = null): void |
Displays output in CLI with formatting |
getFontNames(): array |
Returns all available font names |
getFontByName(string $name): ?array |
Returns specific font configuration |
getAllFonts(): array |
Returns all font configurations |
getLatinFontNames(): array |
Returns only Latin font names |
getPersianFontNames(): array |
Returns only Persian font names |
getPersianStyledFontNames(): array |
Returns only Persian styled font names |
Contributing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License. See the LICENSE file for more information.