DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

2.6. Fonts and OSD

You need to tell MPlayer which font to use to enjoy OSD and subtitles. Any TrueType font or special bitmap fonts will work. However, TrueType fonts are recommended as they look far better, can be properly scaled to the movie size and cope better with different encodings.

2.6.1. TrueType fonts

There are two ways to get TrueType fonts to work. The first is to pass the -font option to specify a TrueType font file on the command line. This option will be a good candidate to put in your configuration file (see the manual page for details). The second is to create a symlink called subfont.ttf to the font file of your choice. Either

ln -s /path/to/sample_font.ttf ~/.mplayer/subfont.ttf

for each user individually or a system-wide one:

ln -s /path/to/sample_font.ttf $PREFIX/share/mplayer/subfont.ttf

If MPlayer was compiled with fontconfig support, the above methods won't work, instead -font expects a fontconfig font name and defaults to the sans-serif font. To get a list of fonts known to fontconfig, use fc-list. Example:

mplayer -font 'Bitstream Vera Sans' anime.mkv

2.6.2. bitmap fonts

If for some reason you wish or need to employ bitmap fonts, download a set from our homepage. You can choose between various ISO fonts and some sets of fonts contributed by users in various encodings.

Uncompress the file you downloaded to ~/.mplayer or $PREFIX/share/mplayer. Then rename or symlink one of the extracted directories to font, for example:

ln -s ~/.mplayer/arial-24 ~/.mplayer/font

ln -s $PREFIX/share/mplayer/arial-24 $PREFIX/share/mplayer/font

Fonts should have an appropriate font.desc file which maps unicode font positions to the actual code page of the subtitle text. Another solution is to have UTF-8-encoded subtitles and use the -utf8 option or just name the subtitles file <video_name>.utf and have it in the same directory as the video file.

2.6.3. OSD menu

MPlayer has a completely user definiable OSD Menu interface.

Note

the Preferences menu is currently UNIMPLEMENTED!

Installation

  1. compile MPlayer by passing the --enable-menu to ./configure
  2. make sure you have an OSD font installed
  3. copy etc/menu.conf to your .mplayer directory
  4. copy etc/input.conf to your .mplayer directory, or to the system-wide MPlayer config dir (default: /usr/local/etc/mplayer)
  5. check and edit input.conf to enable menu movement keys (it is described there).
  6. start MPlayer by the following example:

    $ mplayer -menu file.avi

  7. push any menu key you defined