Automattic / Automattic/gravatar
Initials Avatar does not support Right-to-Left (RTL) languages
- Dominant language
- TypeScript
- Stars
- 361
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
## Description / Observed Behavior
When generating an initials avatar (d=initials) for names written in Right-to-Left (RTL) languages such as Arabic, the text fails to respect the RTL reading direction. Consequently, the characters or word order are rendered incorrectly, leading to a broken or backward visual representation of the user's name/initials.
What kind of issues did you encounter?
## Expected Behavior
The text rendering engine should detect or accept RTL script direction (or provide an option for text direction) so that Arabic and other RTL names are displayed naturally and read correctly from right to left.
## Actual Behavior
The initials/name text is rendered using LTR (Left-to-Right) formatting rules, causing the Arabic text (أحمد خالد) to display incorrectly.
## Repro Steps / Code Example
1. Request a Gravatar initials image using a URL with an Arabic name parameter.
2. Example URL:
[https://gravatar.com/avatar/ac35e2f838a5b3bb47c87cb5f1d4b469?r=g&s=50&d=initials&name=%D8%A3%D8%AD%D9%85%D8%AF+%D8%AE%D8%A7%D9%84%D8%AF](https://gravatar.com/avatar/ac35e2f838a5b3bb47c87cb5f1d4b469?r=g&s=50&d=initials&name=%D8%A3%D8%AD%D9%85%D8%AF+%D8%AE%D8%A7%D9%84%D8%AF)
3. Observe the rendered image output.
## Your Environment
- Feature: Gravatar Initials Avatars (d=initials)
- Affected Languages/Scripts: Arabic, Hebrew, Persian, Urdu, and other RTL scripts.
- Example Payload: name=أحمد خالد (Encoded: %D8%A3%D8%AD%D9%85%D8%AF+%D8%AE%D8%A7%D9%84%D8%AF)
Contributor guide
Research direction
Start with the Gravatar Initials Avatars entry point and reproduce the provided Arabic example URL, comparing its output with the expected right-to-left rendering. Trace the initials text rendering path and verify the result with Arabic, Hebrew, Persian, or Urdu names; done means RTL names display naturally without breaking existing initials behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100