Introduce src dir.
[librarian.git] / src / librarian / font-optimizer / ext / Font-TTF / README.TXT
1         Perl Module: Font::TTF\r
2 \r
3 =head1 Introduction\r
4 \r
5 Perl module for TrueType font hacking. Supports reading, processing and\r
6 writing of the following tables: GDEF, GPOS, GSUB, LTSH, OS/2, PCLT,\r
7 bsln, cmap, cvt, fdsc, feat, fpgm, glyf, hdmx, head, hhea, hmtx, kern,\r
8 loca, maxp, mort, name, post, prep, prop, vhea, vmtx and the reading and\r
9 writing of all other table types.\r
10 \r
11 In short, you can do almost anything with a standard TrueType font with\r
12 this module. Be Brave!\r
13 \r
14 Any suggestions, improvements, additions, subclasses, etc. would be gratefully\r
15 received and probably included in a future release. Please send them to me.\r
16 \r
17 This module has been tested on Win32, Unix and Mac.\r
18 \r
19 Applications that were associated with this module have been moved to Font::TTF::Scripts where great things can be done.\r
20 \r
21 =head1 SYNOPSIS\r
22 \r
23 Here is the regression test (you provide your own font). Run it once and then\r
24 again on the output of the first run. There should be no differences between\r
25 the outputs of the two runs.\r
26 \r
27     use Font::TTF::Font;\r
28 \r
29     $f = Font::TTF::Font->open($ARGV[0]);\r
30 \r
31     # force a read of all the tables\r
32     $f->tables_do(sub { $_[0]->read; });\r
33 \r
34     # force read of all glyphs (use read_dat to use lots of memory!)\r
35     # $f->{'loca'}->glyphs_do(sub { $_[0]->read; });\r
36     $f->{'loca'}->glyphs_do(sub { $_[0]->read_dat; });\r
37     # NB. no need to $g->update since $_[0]->{'glyf'}->out will do it for us\r
38 \r
39     $f->out($ARGV[1]);\r
40     $f->DESTROY;               # forces close of $in and maybe memory reclaim!\r
41 \r
42 =head1 Installation\r
43 \r
44 If you have received this package as part of an Activestate PPM style .zip file\r
45 then type\r
46 \r
47     ppm install Font-TTF.ppd\r
48 \r
49 Otherwise.\r
50 \r
51 To configure this module, cd to the directory that contains this README file\r
52 and type the following.\r
53 \r
54     perl Makefile.PL\r
55 \r
56 Alternatively, if you plan to install Font::TTF somewhere other than\r
57 your system's perl library directory. You can type something like this:\r
58 \r
59     perl Makefile.PL PREFIX=/home/me/perl INSTALLDIRS=perl\r
60 \r
61 Then to build you run make.\r
62 \r
63     make\r
64 \r
65 If you have write access to the perl library directories, you may then\r
66 install by typing:\r
67 \r
68     make install\r
69 \r
70 To tidy up, type:\r
71 \r
72     make realclean\r
73 \r
74 Win32 users should use pmake instead of make. Alternatively installation can be\r
75 done on Win32 by typing:\r
76 \r
77     Setup\r
78 \r
79 Or using the install feature in tools like WinZip.\r
80 \r
81 =head1 CHANGES\r
82 \r
83 =head2 Future Changes\r
84 \r
85 I do not anticipate any more restructuring changes (but reserve the right to do so).\r
86 \r
87 =head1 AUTHOR\r
88 \r
89 Martin Hosken L<Martin_Hosken@sil.org>\r
90 \r
91 Copyright Martin Hosken 1998 and following.\r
92 \r
93 No warranty or expression of effectiveness for anything, least of all anyone's\r
94 safety, is implied in this software or documentation.\r
95 \r
96 =head2 Licensing\r
97 \r
98 The Perl TTF module is licensed under the Perl Artistic License.\r
99 \r