Skip to content

Releases: LasseRafn/php-initial-avatar-generator

FontAwesome Support

31 Jan 14:49
Compare
Choose a tag to compare
  • private => protected visibility
  • FontAwesome v5 support
  • Removed cache

KeepCase

13 Oct 09:32
Compare
Choose a tag to compare
2.2.2

Fix keepCase

Chinese and Japanese support

07 Oct 10:01
Compare
Choose a tag to compare

Letter script detection.

02 Oct 19:22
Compare
Choose a tag to compare

Can now detect language/script and apply a font that supports that script/language.

Supported:

  • Arabic
  • Armenian
  • Bengali
  • Georgian
  • Hebrew
  • Mongolian
  • Thai
  • Tibetan

More will come, when more supporting fonts are found.

GD fonts and better font discovery

25 Sep 08:16
Compare
Choose a tag to compare

Will now NOT default to __DIR__ . $fontFile but instead use it as a fallback.

This also means you can specify in an integer for GD Internal fonts or a complete path. Current implementations should still work, as it will simply fallback to the old implementation if no font is found.

Smoother rounding

24 Sep 20:44
Compare
Choose a tag to compare

I found a way to solve the ugly circle when using rounded(). Now, by using smooth() as well, it will generate a avatar at 5x size (without text) and resize back after the circle has been created. Example below:

Before:
download 2

After:
download 1

As you can see, the text is unchanged but the circle is far smoother. Use this and supply a avatar double the size of the img tag, and you will get some crisp avatars. 👍

Double size of img tag:

Smooth + double size of img tag:

PHP 5.6 support

14 Jun 09:40
Compare
Choose a tag to compare

After seeing https://github.com/sybri/php56-initial-avatar-generator, I decided to add php 5.6 support. Thanks!

Japanese support

31 Mar 07:16
Compare
Choose a tag to compare

It's now possible to use Japanese letters, with a different font.

<?php

require_once 'vendor/autoload.php';

$avatar = new LasseRafn\InitialAvatarGenerator\InitialAvatar();

echo $avatar->font('/fonts/NotoSans-Medium.otf')
            ->generate('こんにちは')
            ->stream('data-url');

Splitted initial generation from core

14 Feb 15:09
Compare
Choose a tag to compare
v2.0

Changed dependency

Can now generate rounded images

16 Jan 17:29
Compare
Choose a tag to compare

Can now generate rounded images, however you should default to using border-radius using CSS instead.