[PR #8050] Fix rendering library thumbnail if it has an Arabic name #11608

Closed
opened 2026-02-07 06:41:27 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/jellyfin/jellyfin/pull/8050

State: closed
Merged: No


Library thumbnail rendering were broken with Arabic names, due to a bug in the DrawText function of the canvas.
Example for the word أفلام:
لقطة شاشة 2022-07-02 في 20 55 50

Changes
I used CanvasExtensions.DrawShapedText to properly render Arabic fonts. However, this function does not consider TextAlign (and calculating text width for Arabic fonts is complicated). As such, I am only using it for Arabic library names, and have set a fixed position from the left for the library name.

لقطة شاشة 2022-07-02 في 20 57 53

Although not ideal, it is better than before. I am open to any feedback!

**Original Pull Request:** https://github.com/jellyfin/jellyfin/pull/8050 **State:** closed **Merged:** No --- Library thumbnail rendering were broken with Arabic names, due to a bug in the DrawText function of the canvas. Example for the word أفلام: ![لقطة شاشة 2022-07-02 في 20 55 50](https://user-images.githubusercontent.com/46264409/177020454-3977b6e5-45bd-4676-8736-d6ec286f2f78.png) **Changes** I used CanvasExtensions.DrawShapedText to properly render Arabic fonts. However, this function does not consider TextAlign (and calculating text width for Arabic fonts is complicated). As such, I am only using it for Arabic library names, and have set a fixed position from the left for the library name. ![لقطة شاشة 2022-07-02 في 20 57 53](https://user-images.githubusercontent.com/46264409/177020479-d97c09c1-697e-44d6-84cd-404e8f7a6953.png) Although not ideal, it is better than before. I am open to any feedback!
OVERLORD added the pull-request label 2026-02-07 06:41:27 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#11608