mpv-player / mpv

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

I need to change fonts to Atkinson Hyperlegible in mpv.conf #15090

Open luigirovatti opened 4 days ago

luigirovatti commented 4 days ago

mpv Information

No response

Other Information

- Windows version: Windows 11 Pro 21H2
- GPU model, driver and version: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz   3.19 GHz 16,0 GB RAM 64-bit
- Source of mpv: https://sourceforge.net/projects/mpv-player-windows/
- Introduced in version: I don't know, I downloaded it from sourceforge, the latest batch was mpv-x86_64-20241014-git-baabc29.

Reproduction Steps

I installed on my pc the Source Sans Pro SemiBold font. Afterwards, I created on users/[name]/appdata/roaming/mpv/ a mpv.conf file and put inside lines of code there I copied and pasted from a youtube video to set the font Source sans pro font as default font for the subtitles. After a while, I decided to install the new font on my pc and change the mpv.conf code (as an amateus, I admit) to try and see if the new font would be recognized by mpv. The font is divided into web fonts and print fonts. I chose print because it has oft formats. In any case, it has 4 types: Bold, Bold Italic, Italic, and Normal. The new code was like this:

#Video

#Hide Cursor in ms
--cursor-autohide=200

#On Screen Display [OSD]
#Don't show a huge volume box on screen when turning the volume up/down or while seeking.
--osd-bar=no
--osd-font-size=25
--osd-font="Atkinson Hyperlegible"
--osd-color='#CCFFFFFF' 
--osd-border-color='#DD322640'

#Audio
--volume=100
--volume-max=120
--audio-channels=5.1
#Audio language priority
--alang=eng,en,enUS,en-US,English,jpn,jp,jap,Japanese
#Load external audio with (almost) the same name as the video
--audio-file-auto=fuzzy

#Subtitle
--sub-visibility=yes
--sub-font="Atkinson-Hyperlegible Normale"
--sub-font-size=47
--sub-color="#FFFFFFFF"
--sub-border-color="#FF262626"
--sub-border-size=3.2
--sub-shadow-offset=1
--sub-shadow-color="#33000000"
--sub-spacing=0.5
--sub-margin-y=70
#Subtitle Language Priority
--slang=eng,en,enUS,en-US,English
#Load external subtitles with (almost) the same name as the video 
--sub-auto=fuzzy

#Screenshots [Saved in Desktop by Default]
--screenshot-format=png
--screenshot-jpeg-quality=100

"Atkinson Hyperlegible Bold" is the name of the font I choose to use for mpv. You can find the original code the yt video used here: https://pastebin.com/NPu2ky9D

Expected Behavior

I expected nothing, in fact, because I'm a amateur in writing code, I simply waited to see if what I wrote was correct.

Actual Behavior

The font wasn't recognized. Instead, it was like this:

mpv_hN7OtTCdpT

Instead of the font I chose, it's totally generic.

Log File

mpv_log1.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

luigirovatti commented 4 days ago

Update: I managed to get the font as "Atkinson Hyperlegible both in --osd-font= and in --sub-font=. I just think I need to specify what the exact name of the subfont. There's bold, italic, bold italic, and regular. Maybe it's their names in Italian. Don't know.