Mercurial > mplayer.hg
annotate TOOLS/subfont-c/README @ 1505:842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
author | arpi |
---|---|
date | Mon, 13 Aug 2001 18:37:10 +0000 |
parents | 2c7b0478db0c |
children | 7336606415f2 |
rev | line source |
---|---|
1470
2c7b0478db0c
mplayer font-generator using FreeType 2.x by Artur Zaprzala <zybi@fanthom.irc.pl>
arpi
parents:
diff
changeset
|
1 Usage: |
2c7b0478db0c
mplayer font-generator using FreeType 2.x by Artur Zaprzala <zybi@fanthom.irc.pl>
arpi
parents:
diff
changeset
|
2 ~~~~~~ |
1505
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
3 1. Make sure you have FreeType 2 installed. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
4 2. Get a TrueType or Type 1 font. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
5 3. Modify `runme' script for your encoding and font path. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
6 4. Type: ./runme |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
7 5. Copy *.raw and font.desc files to ~/.mplayer/font/ |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
8 6. Run subfont alone to see more options. |
1470
2c7b0478db0c
mplayer font-generator using FreeType 2.x by Artur Zaprzala <zybi@fanthom.irc.pl>
arpi
parents:
diff
changeset
|
9 |
2c7b0478db0c
mplayer font-generator using FreeType 2.x by Artur Zaprzala <zybi@fanthom.irc.pl>
arpi
parents:
diff
changeset
|
10 |
1505
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
11 About: |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
12 ~~~~~~ |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
13 `subfont' program renders antialiased OSD and subtitle fonts for mplayer. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
14 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
15 What you get are bitmap and alpha *.raw files and a font.desc. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
16 What you need is TrueType, Type 1 or any other font supported by FreeType. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
17 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
18 Alpha channel is created using outline and Gaussian blur filters. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
19 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
20 ANY encoding is now supported! That is, all 8-bit encodings known by libc |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
21 and user-supplied encodings (also multibyte) through custom encoding files. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
22 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
23 I prepared also Type 1 font `osd.pfb' for OSD characters based on bitmaps |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
24 created by chass. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
25 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
26 Subfont was tested with Korean fonts from truetype-fonts-ko-2.0-1k.noarch.rpm |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
27 I found on http://rpmfind.net/ and euc-kr encoding. Custom encoding file |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
28 for euc-kr was generated from charmap I found in /usr/share/i18n/charmaps/EUC-KR.gz |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
29 (glibc package). This should work with -unicode switch for mplayer |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
30 (though it is not Unicode encoding). |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
31 It took about 14 seconds to render over 8000 characters on P3 @ 600MHz. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
32 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
33 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
34 Custom encodings: |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
35 ~~~~~~~~~~~~~~~~~ |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
36 For each character you want to render write the line consisting of: |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
37 hexadecimal Unicode character code, |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
38 followed by whitespace, |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
39 followed by hexadecimal number representing your encoding, |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
40 followed by new line character. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
41 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
42 Example: to render a single letter `aogonek' (Unicode 0x0105) and encode |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
43 it using iso-8859-2 encoding (0xB1), your custom encoding file will consist |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
44 of a sigle line: |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
45 0105 B1 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
46 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
47 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
48 Notes: |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
49 ~~~~~~ |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
50 + Starting x position of each character and the bitmap width is aligned |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
51 to multiple of 8 (required by mplayer). |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
52 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
53 + Currently subfont won't work on big-endian systems. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
54 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
55 + My development platform is RedHat 7.1. FreeType versions tested are |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
56 2.0.1 through 2.0.4. |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
57 |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
58 + FreeType library has a bug that makes subfont display some warning message |
842c29861e25
upgraded to 1.0b version by Artur Zaprzala <artur.zaprzala@talex.com.pl>
arpi
parents:
1470
diff
changeset
|
59 about Unicode charmap for osd.pfb. |
1470
2c7b0478db0c
mplayer font-generator using FreeType 2.x by Artur Zaprzala <zybi@fanthom.irc.pl>
arpi
parents:
diff
changeset
|
60 |
2c7b0478db0c
mplayer font-generator using FreeType 2.x by Artur Zaprzala <zybi@fanthom.irc.pl>
arpi
parents:
diff
changeset
|
61 |
2c7b0478db0c
mplayer font-generator using FreeType 2.x by Artur Zaprzala <zybi@fanthom.irc.pl>
arpi
parents:
diff
changeset
|
62 Author: |
2c7b0478db0c
mplayer font-generator using FreeType 2.x by Artur Zaprzala <zybi@fanthom.irc.pl>
arpi
parents:
diff
changeset
|
63 ~~~~~~~ |
2c7b0478db0c
mplayer font-generator using FreeType 2.x by Artur Zaprzala <zybi@fanthom.irc.pl>
arpi
parents:
diff
changeset
|
64 Artur Zaprzala <zybi@fanthom.irc.pl> |