mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.23k stars 2.9k forks source link

Simplified Chinese subs display issue #11625

Open zdm9981 opened 1 year ago

zdm9981 commented 1 year ago

Important Information

Provide following Information:

If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

Just play any video with build-in srt subs in Traditional Chinese and Simplified Chinese

Expected behavior

Both Chinese characters display correctly

Actual behavior

Traditional Chinese displays correctly but Simplified Chinese some characters have fallback to another font

Log file

https://zerobin.net/?6122eea95c23f10c#DsgCU2FwdtgGKkqZ9dxCjkZDI5Hv0lNDyl3b/4sFgNY=

The issue will be closed for ignoring the issue template.

Sample files

Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ or similar sites. (Only needed if the issue cannot be reproduced without it.) Do not use garbage like "cloud storage", especially not Google Drive.

hooke007 commented 1 year ago

[ 12.966][v][sub/ass] fontselect: (sans-serif, 400, 0) -> MicrosoftJhengHeiUIRegular, 1, MicrosoftJhengHeiUIRegular

Does Microsoft JhengHei really suppport simplified chinese glyphs?

zdm9981 commented 1 year ago

I don't think it supports simplified chinese

hooke007 commented 1 year ago

Then no issues here.

zdm9981 commented 1 year ago

So how can i let mpv choose a font that support simplified chinese? Or why it doesn't use a font for simplified chinese by default?

hooke007 commented 1 year ago

What it would fall back is simplified chinese.

choose a font that support simplified chinese

https://mpv.io/manual/master/#options-sub-font

Or why it doesn't use a font for simplified chinese by default?

In simplied chinese windows system, there is no built-in Microsoft JhengHei font. It might be your manual installing break the priority of font choice for directwrite.

zdm9981 commented 1 year ago

Well my windows is in english. Could that be the reason? I did install some fonts mainly for ass subs. But I didn't install JhengHei for sure.

hooke007 commented 1 year ago

Then check the video itself, fonts could also be bundled in video.

zdm9981 commented 1 year ago

I mean the font JhengHei is in my windows system but not installed by me. If its bundled with the system I think it's more like mpv's problem?

dyphire commented 1 year ago

You can use --sub-font to specify the font to use when fall back, preferably CJK font such as Source Han Sans.

zdm9981 commented 1 year ago

Since mpv has this autodetecting language for font function, would it be better just adding one for simplified chinese?

dyphire commented 1 year ago

Since mpv has this autodetecting language for font function, would it be better just adding one for simplified chinese?

This may depend on this pr: https://github.com/libass/libass/pull/607