feat: add Vazirmatn fallback font for Arabic/Persian#2841
feat: add Vazirmatn fallback font for Arabic/Persian#2841ammahmoudi wants to merge 1 commit intocinnyapp:devfrom
Conversation
| @@ -0,0 +1,93 @@ | |||
| Copyright 2015 The Vazirmatn Project Authors (https://github.com/rastikerdar/vazirmatn) | |||
There was a problem hiding this comment.
Hi, what is the issue you are having?
There was a problem hiding this comment.
Hi! The current default font doesn't render Persian and Arabic characters optimally, which affects legibility. Adding Vazirmatn as a fallback significantly improves readability and typographic balance for native readers, providing a much better user experience for these languages. Vazirmatn is common in apps with nice support for rtl users.
There was a problem hiding this comment.
There was a problem hiding this comment.
Thoughts on https://fonts.google.com/noto ?
I myself is multilingual and looking at noto, they support wide variety of languages, which would be better approach rather than adding font for each language.
There was a problem hiding this comment.
Thoughts on https://fonts.google.com/noto ?
I myself is multilingual and looking at noto, they support wide variety of languages, which would be better approach rather than adding font for each language.
While it is true that noto fonts provide broad multilingual coverage, Vazirmatn is specifically optimized for Persian and other RTL languages. It is widely used in RTL contexts and is currently the default Persian font in X, reflecting its strong adoption.
|
In general, I don't think adding a new fallback font for every script that renders incorrectly (which is most of them at the moment, as far as I can tell) is a scalable solution. A more broadly suitable approach is to allow in-client configuration of fonts, including system-provided fonts, so that rendering concerns for non-latin scripts can be handled on an individual basis. See the above-linked issue on adding such support. |
3bf8fa2 to
0fa0593
Compare
I agree that user-configurable fonts (#2619) is valuable, but it doesn’t fully solve this problem in practice for Arabic/Persian:
If maintainers still prefer “config-only”, I understand. But I think a targeted Arabic-script fallback is a practical baseline improvement for a large user group, while font configuration can remain an additional power-user feature. |
Behzad9
left a comment
There was a problem hiding this comment.
I believe this feature would significantly improve readability and typographic balance for RTL users.
Alen21137
left a comment
There was a problem hiding this comment.
I have also requested this feature in several other places, and it could be very beneficial for all Persian/Arabic users.
Bundles Vazirmatn (WOFF2) in public/font/vazirmatn/ to avoid runtime external font requests.
Adds @font-face with Arabic unicode ranges and includes OFL.txt.
Updates the global font stack to use Vazirmatn as a fallback after Inter, so Arabic/Persian text renders more cleanly without changing the UI font for everyone.