tintnaingwin / myanfont
Laravel Zawgyi <=> Unicode Package
Installs: 9 690
Dependents: 1
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: ^8.0|^8.1|^8.2
- ext-json: *
- illuminate/contracts: ^8.0|^9.0|^10.0
- illuminate/support: ^8.0|^9.0|^10.0
Requires (Dev)
- laravel/pint: ^1.6
- nunomaduro/collision: ^5.10|^6.1
- nunomaduro/larastan: ^1.0|^2.0
- orchestra/testbench: ^6.23|^7.0|^8.0
- pestphp/pest: ^1.21|^2.0
- pestphp/pest-plugin-laravel: ^1.1|^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
Requirements
version-3.*
version-2.*
version-1.*
version-0.*
Read the extensive documentation on version 0.x and on version 1.x.
Installation
You can install this package via composer using this command:
composer require tintnaingwin/myanfont:"~3.0"
The package will automatically register itself.
Usage
Using the facade
- Unicode to Zawgyi
MyanFont::uni2zg('ဥုံတလဲလဲဖွတလဲလဲ'); // ဥဳံတလဲလဲဖြတလဲလဲ MyanFont::uni2zg('ဥုံတလဲလဲဖွတလဲလဲ'); // ဥဳံတလဲလဲဖြတလဲလဲ
- Zawgyi to Unicode
MyanFont::zg2uni('ဥဳံတလဲလဲဖြတလဲလဲ'); // ဥုံတလဲလဲဖွတလဲလဲ MyanFont::zg2uni('ဥဳံတလဲလဲဖြတလဲလဲ'); // ဥုံတလဲလဲဖွတလဲလဲ
- Detect Font
// zawgyi MyanFont::isZgOrUni('ခ်ယ္ရီ'); // output - zawgyi // unicode MyanFont::isZgOrUni('ချယ်ရီ'); // output - unicode
Using with Helpers
- Unicode to Zawgyi
uni2zg('ဥုံတလဲလဲဖွတလဲလဲ'); // ဥဳံတလဲလဲဖြတလဲလဲ
- Zawgyi to Unicode
zg2uni('ဥဳံတလဲလဲဖြတလဲလဲ'); // ဥုံတလဲလဲဖွတလဲလဲ
- Detect Font
isZgOrUni('ခ်ယ္ရီ'); // output - zawgyi
Testing
You can run the tests with:
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.