mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #8050] Fix rendering library thumbnail if it has an Arabic name #11608
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 أفلام:
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.
Although not ideal, it is better than before. I am open to any feedback!