appwrite / appwrite

Your backend, minus the hassle.
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
42.69k stars 3.85k forks source link

🐛 Bug Report: Avatars Initials API Returns Empty Image #8042

Open ItzNotABug opened 2 months ago

ItzNotABug commented 2 months ago

👟 Reproduction steps

  1. https://cloud.appwrite.io/v1/avatars/initials?name=ItzNotABug > the image will be rendered
  2. https://cloud.appwrite.io/v1/avatars/initials?name=@ItzNotABug > returns only a square with solid color

Possible solutions could be -

  1. Process the character & return an image
  2. Either return an Error specifying the unacceptable character

👍 Expected behavior

Return image with the first character or API error.

👎 Actual Behavior

Blank solid square image.

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

MacOS

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?

EVDOG4LIFE commented 2 months ago

https://github.com/appwrite/appwrite/blob/main/app/controllers/api/avatars.php#L553-L554

Current fontset only supports latin characters, so anything outside of what we have in the font file will be ignored and not rendered.

Font is here - https://github.com/appwrite/appwrite/blob/main/app/assets/fonts/inter-v8-latin-regular.woff2

While its likely intended to not support special characters, we will want to do something to accommodate a more standard utf-8 set to allow Hebrew or Cyrilic characters

Yashc885 commented 1 month ago

may i work on this ?