PHP Myanmar Font
Fund package maintenance!
laravel-myanmar-tools
v1.0.0
2023-01-20 17:44 UTC
Requires
- php: ^8.1
- spatie/macroable: ^2.0
Requires (Dev)
- laravel/pint: ^1.2
- pestphp/pest: ^1.20
This package is auto-updated.
Last update: 2024-11-09 03:34:10 UTC
README
Font
PHP Myanmar Font for Laravel Myanmar Tools
Installation
composer require laravel-myanmar-tools/font
Usage
Check Unicode Font
use LaravelMyanmarTools\Font\Font; $font = new Font; $font->isUnicodeFont('မြန်မာပြည်'); // return true
Check Zawgyi Font
use LaravelMyanmarTools\Font\Font; $font = new Font; $font->isZawgyiFont('ျမန္မာျပည္'); // return true
Detect Myanmar Font
use LaravelMyanmarTools\Font\Font; $font = new Font; $font->detectMyanmarFont('မြန်မာပြည်'); // return "unicode" $font->detectMyanmarFont('ျမန္မာျပည္'); // return "zawgyi"
Zawgyi To Unicode
use LaravelMyanmarTools\Font\Font; $font = new Font; $font->zgToUni('ျမန္မာျပည္'); // return "မြန်မာပြည်"
Unicode To Zawgyi
use LaravelMyanmarTools\Font\Font; $font = new Font; $font->zgToUni('မြန်မာပြည်'); // return "ျမန္မာျပည္"
Customize
use LaravelMyanmarTools\Font\Font; $font = new Font; $font::macro('isNumber', function(string $str) { return is_numeric($str); }); $font->isNumber('12345'); // return true
Testing
composer test