tintnaingwin / myanfont
Laravel Zawgyi <=> Unicode Package
Installs: 11 041
Dependents: 1
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: ^8.2
- ext-json: *
- illuminate/contracts: ^11.0
Requires (Dev)
- laravel/pint: ^1.6
- orchestra/testbench: ^8.11|^9.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/phpstan: ^1.10
README
Requirements
version-4.*
version-3.*
version-2.*
Unsupported since 27-4-2024
version-1.*
Unsupported since 27-4-2024
version-0.*
Unsupported since 27-4-2024
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:"~4.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
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.