https://bugzilla.redhat.com/show_bug.cgi?id=2262410
--- Comment #21 from Akira TAGOH tagoh@redhat.com --- Created attachment 2021107 --> https://bugzilla.redhat.com/attachment.cgi?id=2021107&action=edit screenshot for freetype code
FYI I believe Fontconfig allows multiple language tags to be specified per font. I suspect this is probably what should be done here: list all the system locales for which Sans Arabic should be the default.
Well, it might be able to reduce the scope of the problem. but it doesn't completely fix this issue because it will still happens for those locales. This isn't the chicken-and-egg problem. the rendering issue is out of the scope for fontconfig at all.
Fontconfig doesn't remove the font from the complete font list seen by libass
No, not exactly. What libass does is to obtain *all* the font list for sans-serif no matter what coverage they are. As I said earlier, libass has an own function to filter out fonts. There are nothing else fontconfig can do in that approach. Plus, I don't see any problems on the rendering of mixing Noto Sans and Noto Sans Arabic on Pango and web browsers for example (Though I don't know if mpv really use Noto Sans for alphabets and Noto Sans Arabic for digits). I suppose it isn't a font issue even.
I tried to render both fonts together with simple FreeType code though (well, the baseline isn't straight but it may be wrong in my code), the rendering doesn't look like the original screenshot.
https://gist.github.com/tagoh/447f847f3f651695482508bb40980a33
So I still suspect it may be libass issue.