Here I am with a new tip that may seem silly but it got me struggling with MPlayer config file (~/.mplayer/config) for quite a long time. Not anymore! On a previous post I showed you my MPlayer config file. It turns out the font I wanted to use for subtitles wasn’t actually being used (MPlayer instead was defaulting to Sans). After talking to the always helpful guys over at #mplayer on irc.freenode.net with no luck I decided to do some more googling about the issue. I was lucky enough to be able to find this. So long story short, if you’re still struggling with your MPlayer (command line version) to get it to use a certain font for a subtitle and it’s not following your command replace this line in your ~/.mplayer/config:
font=/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
with the following line:
font=Ubuntu
I’m still getting my head around this so I won’t be able to further detail how to configure this a little more like using a Bold or Italic font. So far all I can tell is that if MPlayer is compiled with fontconfig support (which is the case as of Ubuntu Maverick 10.10) one has to use a fontconfig font name. In order to get a list of fonts known to fontconfig, use this command in a terminal:
fc-list
Results will probably be very complicated to read so just select the font you desire and filter the results with the following example:
fc-list |grep Ubuntu
You may now use the font you want for your subtitle in your MPlayer config file. One little thing before I end this post, for those who don’t know yet ~/ is a short way of spelling your home directory so, for example: if my username is rajeshkoothrappali and my home directory is in /home/rajeshkoothrappali then ~/ is equal to /home/rajeshkoothrappali
I hope you guys get the idea. Cya!


Posted by crimeboy on February 15, 2011 at 12:53 am
cade a receita!?
Posted by rmordor on February 19, 2011 at 11:23 pm
A receita de que???
Posted by Doesn't really matter on June 17, 2011 at 2:47 am
You can try…
font = ‘Arial Rounded Bold’
or
font = ‘Arial Narrow’
Or
After this command in your example…
fc-list | grep Fontin
I get the following results…
Fontin:style=Bold
Fontin:style=Italic
Fontin:style=Regular
Fontin:style=SmallCaps
I then include the following line in my config file…
Font = Fontin:style=Bold
Thanks for the ‘Ubuntu’ tip. I wouldn’t have discovered what I just typed above without it.
Posted by rmordor on June 19, 2011 at 7:55 pm
Thank you!