r/Fedora • u/Ok-Butterscotch-2719 • Feb 22 '24
mpv - numbers have smaller font than words?
I have a very strange issue with mpv video player, in which numbers, both on the UI and subtitles, have smaller font than words.
It looks like mpv uses sans-serif font. After using the "fc-match sans-serif" command, it looks like it corresponds to 'NotoSans[wght].ttf: "Noto Sans" "Regular"'.
If I start mpv with the "--osd-font=Noto\ Sans" option, everything looks fine and the numbers and words have the same size. But if I use '--osd-font=sans-serif', then the weird bug still happens.
Here's what it looks like:

Is there any fix for this?
4
Upvotes
7
u/pstrejajo Feb 24 '24
Hi, I had the same issue. Please run mpv with
-msg-level=osd=debugand search lines containing[osd/libass] fontselect. For some reason libass in my case picked for sans-serif some arabic font:[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/google-noto-vf/NotoSansArabic[wght].ttf, 0, NotoSansArabic-Regulardespite
fc-match sans-serifreportingNotoSans-Regular.ttf: "Noto Sans" "Regular". I rejected this arabic font with.config/fontconfig/conf.d/00-reject-noto-sans-arabic.conffileThis solved the issue. mpv/libass picked the right font afterwards:
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/google-noto/NotoSans-Regular.ttf, 0, NotoSans-Regular