B.3. Fonts
Prev | Appendix B. MPlayer skin format | Next

## B.3. Fonts

As mentioned in the section about the parts of a skin, a font is defined by an image and a description file. You can place the characters anywhere in the image, but make sure that their position and size is given in the description file exactly.

The font description file (with `.fnt` extension) can have comments like the skin configuration file starting with '`;`' (or '`#`', but only at the beginning of the line). The file must have a line in the form

    image = image

Where ``image`` is the name of the image file to be used for the font (you do not have to specify the extension).

    "char" = X, Y, width, height

Here `X` and `Y` specify the position of the `char` character in the image (`0,0` is the upper left corner). `width` and `height` are the dimensions of the character in pixels. The character `char` shall be in UTF-8 encoding.

This example defines the A, B, C characters using `font.png`.

    ; Can be "font" instead of "font.png".
    image = font.png

    ; Three characters are enough for demonstration purposes :-)
    "A" =  0,0, 7,13
    "B" =  7,0, 7,13
    "C" = 14,0, 7,13

### B.3.1. Symbols

Some characters have special meanings when returned by some of the variables used in dlabel. These characters are meant to be shown as symbols so that things like a nice DVD logo can be displayed instead of the character '`d`' for a DVD stream.

The following table lists all the characters that can be used to display symbols (and thus require a different font).

Character | Symbol
--- | ---
p | play
s | stop
e | pause
n | no sound
m | mono sound
t | stereo sound
r | surround sound
g | replay gain
space | no (known)stream
f | stream is a file
a | stream is a CD
v | stream is a Video CD
d | stream is a DVD
u | stream is a URL
b | stream is a TV/DVB broadcast
c | stream is a cue sheet

Prev | Up | Next
B.2. The skin file | Home | B.4. GUI messages