libass: fonts_dir on Windows skips fonts with file names that don’t start with ASCII

I always use mpv as the default player which use libass to render the subtitle. Usually, any fonts those which are put in the directory of the mpv/fonts/ will be correctly used by libass. However, some fonts whose name’s first world is CJK cannot be loaded by libass.

For example, the font 中chinese.tff will not be loaded. But if I change its name to chinese中.tff , everything is OK.

The original issue posted in mpv project. https://github.com/mpv-player/mpv/issues/8639

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 117 (106 by maintainers)

Most upvoted comments

Did you misunderstand?

So I prefer to see api accept the UTF-8-encoded path and then be transcoded to UTF-16 (LE) on windows.

This is exactly what is being proposed.

But if the UTF-8 decoding fails or the path does not exist, it is reattempted as an ANSI path, to ensure ANSI paths continue to work.

My bad. If things go in this direction, I have nothing to complain about.