Mercurial > mplayer.hg
comparison TOOLS/subfont-c/README @ 1607:7336606415f2
Implemented new Gaussian blur algorithm, extended font.desc format, optimized for speed and memory usage.
author | zybi |
---|---|
date | Tue, 21 Aug 2001 14:00:57 +0000 |
parents | 842c29861e25 |
children | 1f3030b34f5c |
comparison
equal
deleted
inserted
replaced
1606:daec36af6c01 | 1607:7336606415f2 |
---|---|
1 Usage: | 1 Usage: |
2 ~~~~~~ | 2 ~~~~~~ |
3 1. Make sure you have FreeType 2 installed. | 3 1. Make sure you have FreeType 2 installed. |
4 2. Get a TrueType or Type 1 font. | 4 2. Get a TrueType or Type 1 font. |
5 3. Modify `runme' script for your encoding and font path. | 5 3. Run ./configure from mplayer's root directory. |
6 4. Type: ./runme | 6 4. Modify `runme' script for your encoding and font path. |
7 5. Copy *.raw and font.desc files to ~/.mplayer/font/ | 7 5. Type: ./runme |
8 6. Run subfont alone to see more options. | 8 6. Copy *.raw and font.desc files to ~/.mplayer/font/ |
9 7. Run subfont alone to see more options. | |
9 | 10 |
10 | 11 |
11 About: | 12 About: |
12 ~~~~~~ | 13 ~~~~~~ |
13 `subfont' program renders antialiased OSD and subtitle fonts for mplayer. | 14 `subfont' program renders antialiased OSD and subtitle fonts for mplayer. |
26 Subfont was tested with Korean fonts from truetype-fonts-ko-2.0-1k.noarch.rpm | 27 Subfont was tested with Korean fonts from truetype-fonts-ko-2.0-1k.noarch.rpm |
27 I found on http://rpmfind.net/ and euc-kr encoding. Custom encoding file | 28 I found on http://rpmfind.net/ and euc-kr encoding. Custom encoding file |
28 for euc-kr was generated from charmap I found in /usr/share/i18n/charmaps/EUC-KR.gz | 29 for euc-kr was generated from charmap I found in /usr/share/i18n/charmaps/EUC-KR.gz |
29 (glibc package). This should work with -unicode switch for mplayer | 30 (glibc package). This should work with -unicode switch for mplayer |
30 (though it is not Unicode encoding). | 31 (though it is not Unicode encoding). |
31 It took about 14 seconds to render over 8000 characters on P3 @ 600MHz. | 32 It took about 10 seconds to render over 8000 characters on P3 @ 600MHz. |
32 | 33 |
33 | 34 |
34 Custom encodings: | 35 Custom encodings: |
35 ~~~~~~~~~~~~~~~~~ | 36 ~~~~~~~~~~~~~~~~~ |
36 For each character you want to render write the line consisting of: | 37 For each character you want to render write the line consisting of: |
41 | 42 |
42 Example: to render a single letter `aogonek' (Unicode 0x0105) and encode | 43 Example: to render a single letter `aogonek' (Unicode 0x0105) and encode |
43 it using iso-8859-2 encoding (0xB1), your custom encoding file will consist | 44 it using iso-8859-2 encoding (0xB1), your custom encoding file will consist |
44 of a sigle line: | 45 of a sigle line: |
45 0105 B1 | 46 0105 B1 |
47 | |
48 | |
49 New font.desc format (proposal): | |
50 ~~~~~~~~~~~~~~~~~~~~~==========~ | |
51 Subfont will generate new font.desc format when compiled with NEW_DESC macro defined | |
52 (uncomment appropriate line in Makefile). | |
53 | |
54 These changes are to make bitmaps smaller and processing faster. | |
55 | |
56 Changes to [info] section: | |
57 There is no `spacewidth'. It will not be useful. | |
58 `height` is the distance from one baseline to the next. | |
59 `ascender' is the distance from the baseline to the highest grid coordinate used to place the outline point. | |
60 `descender' is the distance from the baseline to the lowest grid coordinate used to place the outline point. | |
61 Note: upwards direction is positive. | |
62 Read more: freetype-2.*/docs/glyphs/glyphs-3.html | |
63 | |
64 Changes to [characters] section: | |
65 Bitmap start and bitmap end are replaced with: | |
66 bitmap start, | |
67 bitmap width, | |
68 bitmap height, | |
69 left bearing -- the horizontal distance from the current pen position to the bitmaps's left edge, | |
70 top bearing -- the vertical distance from the baseline to the bitmaps's top edge, | |
71 advance -- the horizontal distance the pen position must be incremented by after each glyph is rendered. | |
72 | |
73 To anderstand this you must think in verctorial coordinates. | |
74 Necessarily read freetype-2.*/docs/glyphs/glyphs-7.html about vectorial coordinates! | |
46 | 75 |
47 | 76 |
48 Notes: | 77 Notes: |
49 ~~~~~~ | 78 ~~~~~~ |
50 + Starting x position of each character and the bitmap width is aligned | 79 + Starting x position of each character and the bitmap width is aligned |