Comments (2)
Okay, so Open Sans does NOT support Japanese letters, but I found a font that does, and included it in the next release.
Using the following code should give you an avatar that works as intended:
<?php
require_once 'vendor/autoload.php';
$avatar = new LasseRafn\InitialAvatarGenerator\InitialAvatar();
echo $avatar->font('/fonts/NotoSans-Medium.otf')
->generate('こんにちは')
->stream('data-url');
You may want to reduce the font size using ->fontSize(0.4)
(default is 0.5, which is 50% of the image size)
from php-initial-avatar-generator.
Hi!
Well, I've tested it with some letters that require UTF8, and it uses mb_
methods to also ensure support — However I have not yet tested Japanese letters, I think the only problem would be the font. It uses Open Sans as default, and I don't know if it supports Japanese letters.
You can however change the font as per your needs. Maybe I'll find an alternative font to use as default.
I'll test it later 👍
from php-initial-avatar-generator.
Related Issues (20)
- Document `keepCase`
- Document use-case against CSS HOT 1
- No way to use Imagick as driver? HOT 4
- Broken Return HOT 3
- Result output HOT 6
- Turkish Characters
- Saving the generated image HOT 2
- Laravel use HOT 9
- Laravel Wrapper HOT 1
- SVG support ? HOT 2
- generate random color HOT 4
- Set image height HOT 1
- Installation failed HOT 1
- Gradient Colors HOT 1
- [FEAT] Emoji/emoticon support
- Initials are not centered HOT 1
- [Regression] SVGs not resizing in IE11
- PHP 8 Support HOT 11
- FontAwesome only user icon works HOT 1
- Deprecation Notice: Dynamic property creation in InitialAvatar.php with php 8.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-initial-avatar-generator.