New upstream version 1.06
Lucas Kanashiro
7 years ago
0 | 1.05 (r1069, 2015-01-26) | |
0 | 1.06 2016-08-17 | |
1 | ||
2 | * Source repo moved from Subversion to Github | |
3 | * OpenType script and lang tags updated from ISO/IEC 14496-22:2015, draft amendment 2 | |
4 | * Various POD improvements | |
5 | * Add deepcopy mode to Dumper::ttfdump() | |
6 | * Bug fixes | |
7 | * Wasn't installing on Windows Perl 5.22 and up | |
8 | * Reading mark-to-ligature lookups would crash if anchors were omitted | |
9 | * Incorrect extension lookup structure | |
10 | * Multiple fixes in Silf table processing | |
11 | * rt.cpan.org #106562 Uninitialized value warnings | |
12 | * rt.cpan.org #106816 spelling errors in manpage | |
13 | ||
14 | 1.05 2015-01-26 r1069 | |
1 | 15 | |
2 | 16 | * Add support for GSUB Type 8 Reverse-chaining substitution |
3 | 17 | * OpenType script/lang/feature tags now based on ISO/IEC 14496-22 |
4 | * Remove deprecated GDL_old.pm | |
18 | * Remove deprecated GDL_old.pm | |
5 | 19 | * |
6 | 20 | * Bug fixes: |
7 | 21 | * Fix rt.cpan.org 92150, 93597 |
10 | 24 | * Fix various issues reading WOFF-compressed font tables |
11 | 25 | * Fix reading DSIG |
12 | 26 | |
13 | 1.04 (r994, 2014-01-09) | |
27 | 1.04 2014-01-09 r994 | |
14 | 28 | |
15 | 29 | * Bug fixes: |
16 | 30 | * Fix rt.cpan.org 80671, 80672; simplify fix for #42553 per OP |
18 | 32 | * Quiet a cleanup warning in TTC processing |
19 | 33 | * Update licensing info for test fonts to OFL |
20 | 34 | |
21 | 1.03 (r969, 2013-11-10) | |
35 | 1.03 2013-11-10 r969 | |
22 | 36 | |
23 | 37 | * Add $t->minsize() to all tables for assisting with font subsetting |
24 | 38 | * Add deduping to Name table writing |
27 | 41 | * Expunge notion of 'dflt' language tag from Ttopen.pm |
28 | 42 | * Bug fixes |
29 | 43 | |
30 | 1.02 (r862, 2012-08-30) | |
44 | 1.02 2012-08-30 r862 | |
31 | 45 | |
32 | 46 | * Fix typo in Useall to get case right |
33 | 47 | |
34 | 1.01 (r859, 2012-08-30) | |
48 | 1.01 2012-08-30 r859 | |
35 | 49 | |
36 | 50 | * Add IO::String prerequisite to make BSD and other testing environments happy |
37 | 51 | |
38 | 1.00 (r857, 2012-08-28) | |
52 | 1.00 2012-08-28 r857 | |
39 | 53 | |
40 | 54 | * Major change to glyph creation/editing -- now utilizes ' isDirty' flag |
41 | 55 | * Add support for: |
49 | 63 | * Copyright and licensing updated to CPAN requirements |
50 | 64 | * Bug fixes |
51 | 65 | |
52 | 0.48 (r692, 2010-12-14) | |
66 | 0.48 2010-12-14 r692 | |
53 | 67 | |
54 | 68 | * Ensure coverage tables are properly sorted |
55 | 69 | * Additional OT tags (from OpenType 1.6) |
56 | 70 | * Bug fixes |
57 | 71 | |
58 | 0.47 (r649, 2009-08-10) | |
72 | 0.47 2009-08-10 r649 | |
59 | 73 | |
60 | 74 | * Add support for Graphite Sill table |
61 | 75 | * Handle kerning tables version > 0 |
62 | 76 | * Bug fixes |
63 | 77 | |
64 | 0.46 (r577, 2009-01-26) | |
78 | 0.46 2009-01-26 r577 | |
65 | 79 | |
66 | 80 | * Bug fixes |
67 | 81 | * Change Copyright to Artistic License 2.0 |
68 | 82 | |
69 | 0.45 (r527, 2008-06-11) | |
83 | 0.45 2008-06-11 r527 | |
70 | 84 | |
71 | 85 | * Introduce changelog |
72 | 86 | * tidy up 0.44 package, fix README to be more accurate |
84 | 84 | MANIFEST This list of files |
85 | 85 | MANIFEST.SKIP |
86 | 86 | README.TXT |
87 | t/changes.t | |
87 | 88 | t/OFL.txt |
88 | 89 | t/tags.t |
89 | 90 | t/testfont.ttf |
18 | 18 | "inc" |
19 | 19 | ] |
20 | 20 | }, |
21 | "prereqs" : { | |
22 | "build" : { | |
23 | "requires" : { | |
24 | "ExtUtils::MakeMaker" : "0" | |
25 | } | |
26 | }, | |
27 | "configure" : { | |
28 | "requires" : { | |
29 | "ExtUtils::MakeMaker" : "0" | |
30 | } | |
31 | }, | |
32 | "runtime" : { | |
33 | "requires" : { | |
34 | "IO::String" : "0" | |
35 | } | |
21 | "release_status" : "stable", | |
22 | "resources" : { | |
23 | "repository" : { | |
24 | "type" : "git", | |
25 | "url" : "https://github.com/silnrsi/font-ttf.git", | |
26 | "web" : "https://github.com/silnrsi/font-ttf" | |
36 | 27 | } |
37 | 28 | }, |
38 | "release_status" : "stable", | |
39 | "version" : "1.05" | |
29 | "version" : "1.06" | |
40 | 30 | } |
1 | 1 | abstract: 'TTF font support for Perl' |
2 | 2 | author: |
3 | 3 | - martin_hosken@sil.org |
4 | build_requires: | |
5 | ExtUtils::MakeMaker: 0 | |
6 | configure_requires: | |
7 | ExtUtils::MakeMaker: 0 | |
4 | build_requires: {} | |
8 | 5 | dynamic_config: 1 |
9 | 6 | generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921' |
10 | 7 | license: artistic_2 |
16 | 13 | directory: |
17 | 14 | - t |
18 | 15 | - inc |
19 | requires: | |
20 | IO::String: 0 | |
21 | version: 1.05 | |
16 | resources: | |
17 | repository: https://github.com/silnrsi/font-ttf.git | |
18 | version: 1.06 |
5 | 5 | getopts('d:rv:'); |
6 | 6 | |
7 | 7 | my %pbuilderopts = ( |
8 | 'gutsy' => '--bindmounts /media/hosk_1' | |
9 | ); | |
8 | 'gutsy' => '--bindmounts /media/hosk_1' | |
9 | ); | |
10 | 10 | |
11 | 11 | $opt_v ||= 1; |
12 | 12 | |
23 | 23 | # incantation to enable MY::pm_to_blib later on |
24 | 24 | if ($^O eq 'MSWin32') |
25 | 25 | { |
26 | push(@ExtUtils::MakeMaker::Overridable, qw(pm_to_blib)); | |
27 | 26 | @extras = ('dist' => { 'TO_UNIX' => 'perl -Mtounix -e "tounix(\"$(DISTVNAME)\")"' }); |
28 | 27 | } |
29 | 28 | |
30 | if ($^O eq 'MSWin32') { | |
31 | # incantation to solve the problem of everyone's $Config{make} being 'nmake' | |
32 | # when we want 'pmake'. And $Config{} is read only. | |
33 | # actually, this is just a copy of the code from ExtUtiles::MM_Win32 tidied | |
34 | # up (to expose tabs) and the dependency on Config removed | |
35 | *MY::pm_to_blib = sub | |
36 | { | |
37 | my $self = shift; | |
38 | my($autodir) = $self->catdir('$(INST_LIB)','auto'); | |
39 | return <<"EOT"; | |
40 | ||
41 | pm_to_blib: \$(TO_INST_PM) | |
42 | \t$self->{NOECHO}\$(PERL) \"-I\$(INST_ARCHLINE)\" \"-I\$(INST_LIB)\" \\ | |
43 | \t\"-I\$(PERL_ARCHLIB)\" \"-I\$(PERL_LIB)\" -MExtUtils::Install \\ | |
44 | \t-e \"pm_to_blib({ qw[\$(PM_TO_BLIB)] }, '$autodir') | |
45 | \t$self->{NOECHO}\$(TOUCH) \$@ | |
46 | ||
47 | EOT | |
48 | }; | |
49 | ||
50 | } | |
51 | elsif ($^O eq 'linux') | |
29 | if ($^O eq 'linux') | |
52 | 30 | { |
53 | 31 | |
54 | *MY::postamble = sub | |
55 | { | |
56 | my ($self) = @_; | |
57 | my ($res); | |
58 | my ($package) = lc($self->{'NAME'}); | |
59 | my ($pversion) = $self->{'VERSION'}; | |
60 | my ($svn) = `svnversion`; | |
61 | my ($sign) = '--auto-debsign' if ($opt_r); | |
62 | my ($fpackage); | |
63 | ||
32 | *MY::postamble = sub | |
33 | { | |
34 | my ($self) = @_; | |
35 | my ($res); | |
36 | my ($package) = lc($self->{'NAME'}); | |
37 | my ($pversion) = $self->{'VERSION'}; | |
38 | my ($svn) = `svnversion`; | |
39 | my ($sign) = '--auto-debsign' if ($opt_r); | |
40 | my ($fpackage); | |
41 | ||
64 | 42 | $svn =~ s/\s+$//o; |
65 | 43 | if ($svn and $svn ne "exported") |
66 | 44 | { |
67 | $svn =~ s/[0-9]*://og; | |
45 | $svn =~ s/[0-9]*://og; | |
68 | 46 | } |
69 | 47 | else |
70 | 48 | { |
71 | 49 | $svn = `hg identify -n`; |
72 | 50 | $svn =~ s/\+?\s+$//o; |
73 | 51 | } |
74 | $package =~ s/::/-/g; | |
75 | $package = "lib${package}-perl"; | |
76 | $pversion .= "+$svn" unless ($opt_r); | |
77 | $fpackage = "$package-$pversion"; | |
78 | ||
79 | $res = <<"EOT"; | |
52 | $package =~ s/::/-/g; | |
53 | $package = "lib${package}-perl"; | |
54 | $pversion .= "+$svn" unless ($opt_r); | |
55 | $fpackage = "$package-$pversion"; | |
56 | ||
57 | $res = <<"EOT"; | |
80 | 58 | debsrc: dist |
81 | 59 | rm -fr $self->{'DISTVNAME'} |
82 | 60 | rm -fr $package |
91 | 69 | # make deb builds an interim deb from svn source for release |
92 | 70 | deb: deb-base |
93 | 71 | EOT |
94 | ||
95 | foreach my $d (split(' ', $opt_d)) | |
96 | { | |
97 | $res .= <<"EOT"; | |
98 | mkdir -p dists/$d | |
72 | ||
73 | foreach my $d (split(' ', $opt_d)) | |
74 | { | |
75 | $res .= <<"EOT"; | |
76 | mkdir -p dists/$d | |
99 | 77 | dch -D $d -v $pversion-$opt_v -m -b -c $fpackage/debian/changelog "Auto build from perl for $d" |
100 | 78 | cd $fpackage && pdebuild --buildresult ../dists/$d -- --basetgz /var/cache/pbuilder/base-$d.tgz $pbuilderopts{$d} |
101 | 79 | EOT |
102 | } | |
103 | ||
104 | return $res; | |
105 | }; | |
106 | ||
80 | } | |
81 | ||
82 | return $res; | |
83 | }; | |
84 | ||
107 | 85 | } |
108 | 86 | |
109 | 87 | my %makeinfo = ( |
110 | 88 | NAME => 'Font::TTF', |
111 | 89 | VERSION_FROM => 'lib/Font/TTF.pm', |
112 | # VERSION => "0.38", | |
113 | 90 | # HTMLLIBPODS => {map {my $t = $_; $t=~s/\..*?$/.html/o; $t='blib/Html/'.$t; $_ => $t;} @theselibs}, |
114 | 91 | # HTMLSCRIPTPODS => {map {my $t=$_; $t=~s/\..*?$/.html/o; $t='blib/Html/'.$t; $_ => $t;} @scripts}, |
115 | 92 | AUTHOR => "martin_hosken\@sil.org", |
118 | 95 | PREREQ_PM => { |
119 | 96 | 'IO::String' => 0 |
120 | 97 | }, |
98 | META_MERGE => { | |
99 | 'meta-spec' => { version => 2 }, | |
100 | resources => { | |
101 | repository => { | |
102 | type => 'git', | |
103 | url => 'https://github.com/silnrsi/font-ttf.git', | |
104 | web => 'https://github.com/silnrsi/font-ttf', | |
105 | } | |
106 | } | |
107 | }, | |
121 | 108 | @extras |
122 | 109 | ); |
123 | 110 |
69 | 69 | |
70 | 70 | make realclean |
71 | 71 | |
72 | Win32 users should use pmake instead of make. Alternatively installation can be | |
73 | done on Win32 by typing: | |
74 | ||
75 | Setup | |
76 | ||
77 | Or using the install feature in tools like WinZip. | |
72 | Windows users should use dmake instead of make. | |
78 | 73 | |
79 | 74 | =head1 CHANGES |
80 | 75 | |
91 | 86 | |
92 | 87 | =head1 LICENSING |
93 | 88 | |
94 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
89 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
95 | 90 | |
96 | 91 | This module is released under the terms of the Artistic License 2.0. |
97 | 92 | For details, see the full text of the license in the file LICENSE. |
32 | 32 | my ($type, $name, $tag) = ($1, $2, $3); |
33 | 33 | print "\n\n//$type\n\n" if $type != $which; |
34 | 34 | $which = $type; |
35 | print " \"$name\" => \"$tag\",\n"; | |
35 | print " \"$name\" => '$tag',\n"; | |
36 | 36 | } |
37 | 37 | |
38 | 38 | elsif (/^'(.{1,4})'\s+(.*)$/o) |
40 | 40 | # Special reverse formatting for feature names |
41 | 41 | my ($name, $tag) = ($2, $1); |
42 | 42 | $tag .= " " x (4 - length($tag)); # pad tag |
43 | print " \"$name\" => \"$tag\",\n"; | |
43 | print " \"$name\" => '$tag',\n"; | |
44 | 44 | } |
45 | 45 | |
46 | 46 | elsif (/^'(.{1,4})-(.{1,4})'\s+(.*)$/o) |
52 | 52 | $tag =~ /(\d+)$/; |
53 | 53 | my $index = $1; |
54 | 54 | $tag .= " " x (4 - length($tag)); # pad tag |
55 | print " \"$name $index\" => \"$tag\",\n"; | |
55 | print " \"$name $index\" => '$tag',\n"; | |
56 | 56 | } |
57 | 57 | } |
58 | 58 | elsif (/^([^\t]*)\t([\w]{2,4})(?: +(\([^\t]*\)))?(?:\t(.*))?$/o) |
62 | 62 | $name =~ s/\s*\(Standard\)\s*//oi; # Remove "(Standard)" from French and German entries |
63 | 63 | $name .= " $extra" if defined $extra; # Dhivehi has "(deprecated)" after the "DHV " tag -- move it to name. |
64 | 64 | $tag .= " " x (4 - length($tag)); # pad tag |
65 | print " \"$name\" => \"$tag\",\n"; | |
65 | print " \"$name\" => '$tag',\n"; | |
66 | 66 | if (defined $iso639list) |
67 | 67 | { |
68 | 68 | $iso639list =~ s/,//g; |
78 | 78 | print "\n"; |
79 | 79 | foreach my $tag (sort keys(%iso639list)) |
80 | 80 | { |
81 | printf " \"$tag\" => \"$iso639list{$tag}\",\n"; | |
81 | printf " '$tag' => '$iso639list{$tag}',\n"; | |
82 | 82 | } |
83 | 83 | |
84 | 84 | =head1 AUTHOR |
137 | 137 | |
138 | 138 | =head1 LICENSING |
139 | 139 | |
140 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
140 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
141 | 141 | |
142 | 142 | This module is released under the terms of the Artistic License 2.0. |
143 | 143 | For details, see the full text of the license in the file LICENSE. |
700 | 700 | |
701 | 701 | =head1 LICENSING |
702 | 702 | |
703 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
703 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
704 | 704 | |
705 | 705 | This module is released under the terms of the Artistic License 2.0. |
706 | 706 | For details, see the full text of the license in the file LICENSE. |
213 | 213 | |
214 | 214 | =head1 LICENSING |
215 | 215 | |
216 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
216 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
217 | 217 | |
218 | 218 | This module is released under the terms of the Artistic License 2.0. |
219 | 219 | For details, see the full text of the license in the file LICENSE. |
164 | 164 | |
165 | 165 | =head1 LICENSING |
166 | 166 | |
167 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
167 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
168 | 168 | |
169 | 169 | This module is released under the terms of the Artistic License 2.0. |
170 | 170 | For details, see the full text of the license in the file LICENSE. |
734 | 734 | |
735 | 735 | =head1 LICENSING |
736 | 736 | |
737 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
737 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
738 | 738 | |
739 | 739 | This module is released under the terms of the Artistic License 2.0. |
740 | 740 | For details, see the full text of the license in the file LICENSE. |
339 | 339 | |
340 | 340 | =head1 LICENSING |
341 | 341 | |
342 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
342 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
343 | 343 | |
344 | 344 | This module is released under the terms of the Artistic License 2.0. |
345 | 345 | For details, see the full text of the license in the file LICENSE. |
78 | 78 | |
79 | 79 | =head1 LICENSING |
80 | 80 | |
81 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
81 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
82 | 82 | |
83 | 83 | This module is released under the terms of the Artistic License 2.0. |
84 | 84 | For details, see the full text of the license in the file LICENSE. |
76 | 76 | |
77 | 77 | =head1 LICENSING |
78 | 78 | |
79 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
79 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
80 | 80 | |
81 | 81 | This module is released under the terms of the Artistic License 2.0. |
82 | 82 | For details, see the full text of the license in the file LICENSE. |
174 | 174 | |
175 | 175 | =head1 LICENSING |
176 | 176 | |
177 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
177 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
178 | 178 | |
179 | 179 | This module is released under the terms of the Artistic License 2.0. |
180 | 180 | For details, see the full text of the license in the file LICENSE. |
13 | 13 | # Print font table with name |
14 | 14 | print ttfdump($font->{'head'}, 'head'); |
15 | 15 | |
16 | # Print font table with name and other options | |
17 | print ttfdump($font->{'head'}, 'head', %opts); | |
18 | ||
16 | 19 | # Print one glyph's data: |
17 | 20 | print ttfdump($font->{'loca'}->read->{'glyphs'}[$gid], "glyph_$gid"); |
18 | 21 | |
23 | 26 | many of the object structures have ' PARENT' links that refer back to the object's parent, |
24 | 27 | which means that Data::Dumper ends up dumping the whole font no matter what. |
25 | 28 | |
26 | The purpose of this module is to do just one thing: invoke Data::Dumper with a | |
29 | The main purpose of this module is to invoke Data::Dumper with a | |
27 | 30 | filter that skips over the ' PARENT' element of any hash. |
28 | 31 | |
29 | 32 | To reduce output further, this module also skips over ' CACHE' elements and any |
30 | 33 | hash element whose value is a Font::TTF::Glyph or Font::TTF::Font object. |
31 | 34 | (Really should make this configurable.) |
35 | ||
36 | If $opts{'d'}, then set Deepcopy mode to minimize use of crossreferencing. | |
32 | 37 | |
33 | 38 | =cut |
34 | 39 | |
44 | 49 | |
45 | 50 | sub ttfdump |
46 | 51 | { |
47 | my ($var, $name) = @_; | |
52 | my ($var, $name, %opts) = @_; | |
48 | 53 | my $res; |
49 | 54 | |
50 | 55 | my $d = Data::Dumper->new([$var]); |
51 | 56 | $d->Names([$name]) if defined $name; |
52 | 57 | $d->Sortkeys(\&myfilter); # This is the trick to keep from dumping the whole font |
58 | $d->Deepcopy($opts{'d'}); # Caller controls whether to use crossreferencing | |
53 | 59 | $d->Indent(3); # I want array indicies |
54 | 60 | $d->Useqq(1); # Perlquote -- slower but there might be binary data. |
55 | 61 | $res = $d->Dump; |
79 | 85 | |
80 | 86 | =head1 LICENSING |
81 | 87 | |
82 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
88 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
83 | 89 | |
84 | 90 | This module is released under the terms of the Artistic License 2.0. |
85 | 91 | For details, see the full text of the license in the file LICENSE. |
298 | 298 | |
299 | 299 | =head1 LICENSING |
300 | 300 | |
301 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
301 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
302 | 302 | |
303 | 303 | This module is released under the terms of the Artistic License 2.0. |
304 | 304 | For details, see the full text of the license in the file LICENSE. |
247 | 247 | |
248 | 248 | =head1 LICENSING |
249 | 249 | |
250 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
250 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
251 | 251 | |
252 | 252 | This module is released under the terms of the Artistic License 2.0. |
253 | 253 | For details, see the full text of the license in the file LICENSE. |
126 | 126 | |
127 | 127 | =head1 LICENSING |
128 | 128 | |
129 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
129 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
130 | 130 | |
131 | 131 | This module is released under the terms of the Artistic License 2.0. |
132 | 132 | For details, see the full text of the license in the file LICENSE. |
202 | 202 | |
203 | 203 | =head1 LICENSING |
204 | 204 | |
205 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
205 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
206 | 206 | |
207 | 207 | This module is released under the terms of the Artistic License 2.0. |
208 | 208 | For details, see the full text of the license in the file LICENSE. |
156 | 156 | |
157 | 157 | =head1 LICENSING |
158 | 158 | |
159 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
159 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
160 | 160 | |
161 | 161 | This module is released under the terms of the Artistic License 2.0. |
162 | 162 | For details, see the full text of the license in the file LICENSE. |
121 | 121 | |
122 | 122 | =head1 LICENSING |
123 | 123 | |
124 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
124 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
125 | 125 | |
126 | 126 | This module is released under the terms of the Artistic License 2.0. |
127 | 127 | For details, see the full text of the license in the file LICENSE. |
99 | 99 | |
100 | 100 | =head1 LICENSING |
101 | 101 | |
102 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
102 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
103 | 103 | |
104 | 104 | This module is released under the terms of the Artistic License 2.0. |
105 | 105 | For details, see the full text of the license in the file LICENSE. |
106 | 106 | |
107 | 107 | =head1 LICENSING |
108 | 108 | |
109 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
109 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
110 | 110 | |
111 | 111 | This module is released under the terms of the Artistic License 2.0. |
112 | 112 | For details, see the full text of the license in the file LICENSE. |
915 | 915 | |
916 | 916 | =head1 LICENSING |
917 | 917 | |
918 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
918 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
919 | 919 | |
920 | 920 | This module is released under the terms of the Artistic License 2.0. |
921 | 921 | For details, see the full text of the license in the file LICENSE. |
84 | 84 | |
85 | 85 | =head1 LICENSING |
86 | 86 | |
87 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
87 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
88 | 88 | |
89 | 89 | This module is released under the terms of the Artistic License 2.0. |
90 | 90 | For details, see the full text of the license in the file LICENSE. |
290 | 290 | $loc = $fh->tell(); |
291 | 291 | if (defined $self->{'MARKSETS'} && @{$self->{'MARKSETS'}} > 0) |
292 | 292 | { |
293 | $self->{'Version'} = 0x00010002; | |
293 | $self->{'Version'} = 0x00010002 if ($self->{'Version'} < 0x00010002); | |
294 | 294 | $fh->print(TTF_Pack('LSSSSS', $self->{'Version'}, 0, 0, 0, 0, 0)); |
295 | 295 | } |
296 | 296 | else |
465 | 465 | |
466 | 466 | =head1 LICENSING |
467 | 467 | |
468 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
468 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
469 | 469 | |
470 | 470 | This module is released under the terms of the Artistic License 2.0. |
471 | 471 | For details, see the full text of the license in the file LICENSE. |
318 | 318 | { |
319 | 319 | my (@offs, $mloc, $thisloc, $ncomp, $k); |
320 | 320 | |
321 | $lookup->{'MATCH'} = [$lookup->{'COVERAGE'}]; | |
322 | $lookup->{'COVERAGE'} = $self->read_cover($count, $loc, $lookup, $fh, 1); | |
321 | $lookup->{'MATCH'} = [$lookup->{'COVERAGE'}]; # Attaching mark | |
322 | $lookup->{'COVERAGE'} = $self->read_cover($count, $loc, $lookup, $fh, 1); # base/lig/mark being attached to | |
323 | 323 | $fh->read($dat, 6); |
324 | 324 | ($mcount, $moff, $boff) = TTF_Unpack('S*', $dat); |
325 | # Read MarkArray | |
325 | 326 | $fh->seek($loc + $moff, 0); |
326 | 327 | $fh->read($dat, 2); |
327 | 328 | $count = TTF_Unpack('S', $dat); |
332 | 333 | $self->read_anchor(TTF_Unpack('S', substr($dat, 2, 2)) + $moff, |
333 | 334 | $loc, $lookup, $fh)]); |
334 | 335 | } |
336 | # Read BaseArray/LigatureArray/Mark2Array | |
335 | 337 | $fh->seek($loc + $boff, 0); |
336 | 338 | $fh->read($dat, 2); |
337 | 339 | $count = TTF_Unpack('S', $dat); |
357 | 359 | $subst = []; |
358 | 360 | $fh->read($dat, $mcount << 1); |
359 | 361 | for ($k = 0; $k < $mcount; $k++) |
360 | { push (@$subst, $self->read_anchor(TTF_Unpack('S', substr($dat, $k << 1, 2)) + $thisloc - $loc, | |
361 | $loc, $lookup, $fh)); } | |
362 | { push (@$subst, $self->read_anchor(TTF_Unpack('S', substr($dat, $k << 1, 2)), | |
363 | $thisloc, $lookup, $fh)); } | |
362 | 364 | |
363 | 365 | push (@{$lookup->{'RULES'}[$i]}, {'ACTION' => $subst}); |
364 | 366 | } |
697 | 699 | |
698 | 700 | =head1 LICENSING |
699 | 701 | |
700 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
702 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
701 | 703 | |
702 | 704 | This module is released under the terms of the Artistic License 2.0. |
703 | 705 | For details, see the full text of the license in the file LICENSE. |
287 | 287 | |
288 | 288 | =head1 LICENSING |
289 | 289 | |
290 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
290 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
291 | 291 | |
292 | 292 | This module is released under the terms of the Artistic License 2.0. |
293 | 293 | For details, see the full text of the license in the file LICENSE. |
135 | 135 | |
136 | 136 | =head1 LICENSING |
137 | 137 | |
138 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
138 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
139 | 139 | |
140 | 140 | This module is released under the terms of the Artistic License 2.0. |
141 | 141 | For details, see the full text of the license in the file LICENSE. |
107 | 107 | |
108 | 108 | =head1 LICENSING |
109 | 109 | |
110 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
110 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
111 | 111 | |
112 | 112 | This module is released under the terms of the Artistic License 2.0. |
113 | 113 | For details, see the full text of the license in the file LICENSE. |
167 | 167 | |
168 | 168 | =head1 LICENSING |
169 | 169 | |
170 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
170 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
171 | 171 | |
172 | 172 | This module is released under the terms of the Artistic License 2.0. |
173 | 173 | For details, see the full text of the license in the file LICENSE. |
266 | 266 | return $self if (defined $self->{' read'} && $self->{' read'} > 0); |
267 | 267 | $self->{' read'} = 1; |
268 | 268 | $fh->seek($self->{' LOC'} + $self->{' BASE'}, 0); |
269 | $fh->read($self->{' DAT'}, $self->{' LEN'}); | |
270 | TTF_Read_Fields($self, $self->{' DAT'}, \%fields); | |
269 | $fh->read($dat, $self->{' LEN'}); | |
270 | TTF_Read_Fields($self, $self->{' DAT'} = $dat, \%fields); | |
271 | 271 | $self; |
272 | 272 | } |
273 | 273 | |
841 | 841 | is all the compounds and their references and so on. If this glyph is not a |
842 | 842 | compound, then returns an empty array. |
843 | 843 | |
844 | Please note the warning about bad fonts that reference nonexistant glyphs | |
844 | Please note the warning about bad fonts that reference nonexistent glyphs | |
845 | 845 | under INSTANCE VARIABLES above. This function will not attempt to |
846 | filter out nonexistant glyph numbers. | |
846 | filter out nonexistent glyph numbers. | |
847 | 847 | |
848 | 848 | =cut |
849 | 849 | |
890 | 890 | |
891 | 891 | =head1 LICENSING |
892 | 892 | |
893 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
893 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
894 | 894 | |
895 | 895 | This module is released under the terms of the Artistic License 2.0. |
896 | 896 | For details, see the full text of the license in the file LICENSE. |
307 | 307 | |
308 | 308 | =head1 LICENSING |
309 | 309 | |
310 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
310 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
311 | 311 | |
312 | 312 | This module is released under the terms of the Artistic License 2.0. |
313 | 313 | For details, see the full text of the license in the file LICENSE. |
159 | 159 | |
160 | 160 | =head1 LICENSING |
161 | 161 | |
162 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
162 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
163 | 163 | |
164 | 164 | This module is released under the terms of the Artistic License 2.0. |
165 | 165 | For details, see the full text of the license in the file LICENSE. |
260 | 260 | |
261 | 261 | =head1 LICENSING |
262 | 262 | |
263 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
263 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
264 | 264 | |
265 | 265 | This module is released under the terms of the Artistic License 2.0. |
266 | 266 | For details, see the full text of the license in the file LICENSE. |
169 | 169 | |
170 | 170 | =head1 LICENSING |
171 | 171 | |
172 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
172 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
173 | 173 | |
174 | 174 | This module is released under the terms of the Artistic License 2.0. |
175 | 175 | For details, see the full text of the license in the file LICENSE. |
211 | 211 | |
212 | 212 | =head1 LICENSING |
213 | 213 | |
214 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
214 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
215 | 215 | |
216 | 216 | This module is released under the terms of the Artistic License 2.0. |
217 | 217 | For details, see the full text of the license in the file LICENSE. |
150 | 150 | |
151 | 151 | =head1 LICENSING |
152 | 152 | |
153 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
153 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
154 | 154 | |
155 | 155 | This module is released under the terms of the Artistic License 2.0. |
156 | 156 | For details, see the full text of the license in the file LICENSE. |
90 | 90 | |
91 | 91 | =head1 LICENSING |
92 | 92 | |
93 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
93 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
94 | 94 | |
95 | 95 | This module is released under the terms of the Artistic License 2.0. |
96 | 96 | For details, see the full text of the license in the file LICENSE. |
106 | 106 | |
107 | 107 | =head1 LICENSING |
108 | 108 | |
109 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
109 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
110 | 110 | |
111 | 111 | This module is released under the terms of the Artistic License 2.0. |
112 | 112 | For details, see the full text of the license in the file LICENSE. |
140 | 140 | |
141 | 141 | =head1 LICENSING |
142 | 142 | |
143 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
143 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
144 | 144 | |
145 | 145 | This module is released under the terms of the Artistic License 2.0. |
146 | 146 | For details, see the full text of the license in the file LICENSE. |
172 | 172 | |
173 | 173 | =head1 LICENSING |
174 | 174 | |
175 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
175 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
176 | 176 | |
177 | 177 | This module is released under the terms of the Artistic License 2.0. |
178 | 178 | For details, see the full text of the license in the file LICENSE. |
352 | 352 | |
353 | 353 | =head1 LICENSING |
354 | 354 | |
355 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
355 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
356 | 356 | |
357 | 357 | This module is released under the terms of the Artistic License 2.0. |
358 | 358 | For details, see the full text of the license in the file LICENSE. |
97 | 97 | |
98 | 98 | =head1 LICENSING |
99 | 99 | |
100 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
100 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
101 | 101 | |
102 | 102 | This module is released under the terms of the Artistic License 2.0. |
103 | 103 | For details, see the full text of the license in the file LICENSE. |
184 | 184 | |
185 | 185 | =head1 LICENSING |
186 | 186 | |
187 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
187 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
188 | 188 | |
189 | 189 | This module is released under the terms of the Artistic License 2.0. |
190 | 190 | For details, see the full text of the license in the file LICENSE. |
207 | 207 | Martin Hosken L<http://scripts.sil.org/FontUtils>. |
208 | 208 | (see CONTRIBUTORS for other authors). |
209 | 209 | |
210 | ||
211 | ||
212 | 210 | =head1 LICENSING |
213 | 211 | |
214 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
215 | ||
216 | This module is released under the terms of the Artistic License 2.0. | |
212 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
213 | ||
214 | This module is released under the terms of the Artistic License 2.0. | |
217 | 215 | For details, see the full text of the license in the file LICENSE. |
218 | 216 | |
219 | ||
220 | ||
221 | 217 | =cut |
222 | 218 | |
223 | 1;⏎ | |
219 | 1; |
187 | 187 | |
188 | 188 | =head1 LICENSING |
189 | 189 | |
190 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
190 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
191 | 191 | |
192 | 192 | This module is released under the terms of the Artistic License 2.0. |
193 | 193 | For details, see the full text of the license in the file LICENSE. |
193 | 193 | |
194 | 194 | =head1 LICENSING |
195 | 195 | |
196 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
196 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
197 | 197 | |
198 | 198 | This module is released under the terms of the Artistic License 2.0. |
199 | 199 | For details, see the full text of the license in the file LICENSE. |
153 | 153 | |
154 | 154 | =head1 LICENSING |
155 | 155 | |
156 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
156 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
157 | 157 | |
158 | 158 | This module is released under the terms of the Artistic License 2.0. |
159 | 159 | For details, see the full text of the license in the file LICENSE. |
176 | 176 | |
177 | 177 | =head1 LICENSING |
178 | 178 | |
179 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
179 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
180 | 180 | |
181 | 181 | This module is released under the terms of the Artistic License 2.0. |
182 | 182 | For details, see the full text of the license in the file LICENSE. |
243 | 243 | |
244 | 244 | =head1 LICENSING |
245 | 245 | |
246 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
246 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
247 | 247 | |
248 | 248 | This module is released under the terms of the Artistic License 2.0. |
249 | 249 | For details, see the full text of the license in the file LICENSE. |
92 | 92 | |
93 | 93 | =head1 LICENSING |
94 | 94 | |
95 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
95 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
96 | 96 | |
97 | 97 | This module is released under the terms of the Artistic License 2.0. |
98 | 98 | For details, see the full text of the license in the file LICENSE. |
104 | 104 | |
105 | 105 | =head1 LICENSING |
106 | 106 | |
107 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
107 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
108 | 108 | |
109 | 109 | This module is released under the terms of the Artistic License 2.0. |
110 | 110 | For details, see the full text of the license in the file LICENSE. |
197 | 197 | |
198 | 198 | =head1 LICENSING |
199 | 199 | |
200 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
200 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
201 | 201 | |
202 | 202 | This module is released under the terms of the Artistic License 2.0. |
203 | 203 | For details, see the full text of the license in the file LICENSE. |
117 | 117 | |
118 | 118 | =head1 LICENSING |
119 | 119 | |
120 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
120 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
121 | 121 | |
122 | 122 | This module is released under the terms of the Artistic License 2.0. |
123 | 123 | For details, see the full text of the license in the file LICENSE. |
904 | 904 | |
905 | 905 | =head1 LICENSING |
906 | 906 | |
907 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
907 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
908 | 908 | |
909 | 909 | This module is released under the terms of the Artistic License 2.0. |
910 | 910 | For details, see the full text of the license in the file LICENSE. |
1024 | 1024 | |
1025 | 1025 | =head1 LICENSING |
1026 | 1026 | |
1027 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
1027 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
1028 | 1028 | |
1029 | 1029 | This module is released under the terms of the Artistic License 2.0. |
1030 | 1030 | For details, see the full text of the license in the file LICENSE. |
59 | 59 | %tttags = ( |
60 | 60 | |
61 | 61 | 'SCRIPT' => { |
62 | "Adlam" => 'adlm', | |
63 | "Ahom" => 'ahom', | |
64 | "Anatolian Hieroglyphs" => 'hluw', | |
62 | 65 | "Arabic" => 'arab', |
63 | 66 | "Armenian" => 'armn', |
64 | 67 | "Avestan" => 'avst', |
65 | 68 | "Balinese" => 'bali', |
66 | 69 | "Bamum" => 'bamu', |
70 | "Bassa Vah" => 'bass', | |
67 | 71 | "Batak" => 'batk', |
68 | 72 | "Bengali" => 'beng', |
69 | 73 | "Bengali v.2" => 'bng2', |
74 | "Bhaiksuki" => 'bhks', | |
70 | 75 | "Bopomofo" => 'bopo', |
71 | 76 | "Brahmi" => 'brah', |
72 | 77 | "Braille" => 'brai', |
75 | 80 | "Byzantine Music" => 'byzm', |
76 | 81 | "Canadian Syllabics" => 'cans', |
77 | 82 | "Carian" => 'cari', |
83 | "Caucasian Albanian" => 'aghb', | |
78 | 84 | "Chakma" => 'cakm', |
79 | 85 | "Cham" => 'cham', |
80 | 86 | "Cherokee" => 'cher', |
86 | 92 | "Deseret" => 'dsrt', |
87 | 93 | "Devanagari" => 'deva', |
88 | 94 | "Devanagari v.2" => 'dev2', |
95 | "Duployan" => 'dupl', | |
89 | 96 | "Egyptian hieroglyphs" => 'egyp', |
97 | "Elbasan" => 'elba', | |
90 | 98 | "Ethiopic" => 'ethi', |
91 | 99 | "Georgian" => 'geor', |
92 | 100 | "Glagolitic" => 'glag', |
93 | 101 | "Gothic" => 'goth', |
102 | "Grantha" => 'gran', | |
94 | 103 | "Greek" => 'grek', |
95 | 104 | "Gujarati" => 'gujr', |
96 | 105 | "Gujarati v.2" => 'gjr2', |
99 | 108 | "Hangul" => 'hang', |
100 | 109 | "Hangul Jamo" => 'jamo', |
101 | 110 | "Hanunoo" => 'hano', |
111 | "Hatran" => 'hatr', | |
102 | 112 | "Hebrew" => 'hebr', |
103 | 113 | "Hiragana" => 'kana', |
104 | 114 | "Imperial Aramaic" => 'armi', |
112 | 122 | "Kayah Li" => 'kali', |
113 | 123 | "Kharosthi" => 'khar', |
114 | 124 | "Khmer" => 'khmr', |
125 | "Khojki" => 'khoj', | |
126 | "Khudawadi" => 'sind', | |
115 | 127 | "Lao" => 'lao ', |
116 | 128 | "Latin" => 'latn', |
117 | 129 | "Lepcha" => 'lepc', |
118 | 130 | "Limbu" => 'limb', |
131 | "Linear A" => 'lina', | |
119 | 132 | "Linear B" => 'linb', |
120 | 133 | "Lisu (Fraser)" => 'lisu', |
121 | 134 | "Lycian" => 'lyci', |
122 | 135 | "Lydian" => 'lydi', |
136 | "Mahajani" => 'mahj', | |
137 | "Marchen" => 'marc', | |
123 | 138 | "Malayalam" => 'mlym', |
124 | 139 | "Malayalam v.2" => 'mlm2', |
125 | 140 | "Mandaic, Mandaean" => 'mand', |
141 | "Manichaean" => 'mani', | |
126 | 142 | "Mathematical Alphanumeric Symbols" => 'math', |
127 | 143 | "Meitei Mayek (Meithei, Meetei)" => 'mtei', |
144 | "Mende Kikakui" => 'mend', | |
128 | 145 | "Meroitic Cursive" => 'merc', |
129 | 146 | "Meroitic Hieroglyphs" => 'mero', |
130 | 147 | "Miao" => 'plrd', |
148 | "Modi" => 'modi', | |
131 | 149 | "Mongolian" => 'mong', |
150 | "Mro" => 'mroo', | |
151 | "Multani" => 'mult', | |
132 | 152 | "Musical Symbols" => 'musc', |
133 | 153 | "Myanmar" => 'mymr', |
134 | 154 | "Myanmar v.2" => 'mym2', |
155 | "Nabataean" => 'nbat', | |
156 | "Newa" => 'newa', | |
135 | 157 | "New Tai Lue" => 'talu', |
136 | 158 | "N'Ko" => 'nko ', |
159 | "Odia (formerly Oriya)" => 'orya', | |
160 | "Odia (formerly Oriya) v.2" => 'ory2', | |
137 | 161 | "Ogham" => 'ogam', |
138 | 162 | "Ol Chiki" => 'olck', |
139 | 163 | "Old Italic" => 'ital', |
164 | "Old Hungarian" => 'hung', | |
165 | "Old North Arabian" => 'narb', | |
166 | "Old Permic" => 'perm', | |
140 | 167 | "Old Persian Cuneiform" => 'xpeo', |
141 | 168 | "Old South Arabian" => 'sarb', |
142 | 169 | "Old Turkic, Orkhon Runic" => 'orkh', |
143 | "Odia (formerly Oriya)" => 'orya', | |
144 | "Odia (formerly Oriya) v.2" => 'ory2', | |
170 | "Osage" => 'osge', | |
145 | 171 | "Osmanya" => 'osma', |
172 | "Pahawh Hmong" => 'hmng', | |
173 | "Palmyrene" => 'palm', | |
174 | "Pau Cin Hau" => 'pauc', | |
146 | 175 | "Phags-pa" => 'phag', |
147 | 176 | "Phoenician" => 'phnx', |
177 | "Psalter Pahlavi" => 'phlp', | |
148 | 178 | "Rejang" => 'rjng', |
149 | 179 | "Runic" => 'runr', |
150 | 180 | "Samaritan" => 'samr', |
151 | 181 | "Saurashtra" => 'saur', |
152 | 182 | "Sharada" => 'shrd', |
153 | 183 | "Shavian" => 'shaw', |
184 | "Siddham" => 'sidd', | |
185 | "Sign Writing" => 'sgnw', | |
154 | 186 | "Sinhala" => 'sinh', |
155 | 187 | "Sora Sompeng" => 'sora', |
156 | 188 | "Sumero-Akkadian Cuneiform" => 'xsux', |
165 | 197 | "Takri" => 'takr', |
166 | 198 | "Tamil" => 'taml', |
167 | 199 | "Tamil v.2" => 'tml2', |
200 | "Tangut" => 'tang', | |
168 | 201 | "Telugu" => 'telu', |
169 | 202 | "Telugu v.2" => 'tel2', |
170 | 203 | "Thaana" => 'thaa', |
171 | 204 | "Thai" => 'thai', |
172 | 205 | "Tibetan" => 'tibt', |
173 | 206 | "Tifinagh" => 'tfng', |
207 | "Tirhuta" => 'tirh', | |
174 | 208 | "Ugaritic Cuneiform" => 'ugar', |
175 | 209 | "Vai" => 'vai ', |
210 | "Warang Citi" => 'wara', | |
176 | 211 | "Yi" => 'yi ', |
177 | 212 | }, |
178 | 213 | |
248 | 283 | "Bugis" => 'BUG ', |
249 | 284 | "Bulgarian" => 'BGR ', |
250 | 285 | "Burmese" => 'BRM ', |
286 | "Burushaski" => 'BSK ', | |
251 | 287 | "Cajun French" => 'FRC ', |
252 | 288 | "Carrier" => 'CRR ', |
253 | 289 | "Catalan" => 'CAT ', |
318 | 354 | "Fang" => 'FAN0', |
319 | 355 | "Fanti" => 'FAT ', |
320 | 356 | "Faroese" => 'FOS ', |
357 | "Fe'fe'" => 'FMP ', | |
321 | 358 | "Fijian" => 'FJI ', |
322 | 359 | "Filipino" => 'PIL ', |
323 | 360 | "Finnish" => 'FIN ', |
422 | 459 | "Khanty-Vakhi" => 'KHV ', |
423 | 460 | "Khasi" => 'KSI ', |
424 | 461 | "Khmer" => 'KHM ', |
462 | "Khorasani Turkic" => 'KMZ ', | |
425 | 463 | "Khowar" => 'KHW ', |
426 | 464 | "Khutsuri Georgian" => 'KGE ', |
427 | 465 | "Kikongo" => 'KON ', |
451 | 489 | "Kpelle (Liberia)" => 'XPE ', |
452 | 490 | "Kpelle" => 'KPL ', |
453 | 491 | "Krio" => 'KRI ', |
492 | "Krymchak" => 'JCT ', | |
454 | 493 | "Kuanyama" => 'KUA ', |
455 | 494 | "Kui" => 'KUI ', |
456 | 495 | "Kulvi" => 'KUL ', |
525 | 564 | "Marwari" => 'MAW ', |
526 | 565 | "Mayan" => 'MYN ', |
527 | 566 | "Mazanderani" => 'MZN ', |
567 | "Mbembe Tigon" => 'NZA ', | |
568 | "Mbo" => 'MBO ', | |
528 | 569 | "Mbundu" => 'MBN ', |
529 | 570 | "Me'en" => 'MEN ', |
571 | "Medumba" => 'BYV ', | |
530 | 572 | "Mende" => 'MDE ', |
531 | 573 | "Meru" => 'MER ', |
532 | 574 | "Mewati" => 'WTM ', |
567 | 609 | "Niuean" => 'NIU ', |
568 | 610 | "Nogai" => 'NOG ', |
569 | 611 | "Norfolk" => 'PIH ', |
612 | "North Slavey" => 'SCS ', | |
570 | 613 | "Northern Sami" => 'NSM ', |
571 | 614 | "Northern Thai" => 'NTA ', |
572 | 615 | "Norway House Cree" => 'NHC ', |
1069 | 1112 | 'BRM ' => 'mya', |
1070 | 1113 | 'BRX ' => 'brx', |
1071 | 1114 | 'BSH ' => 'bak', |
1115 | "BSK " => 'bsk', | |
1072 | 1116 | 'BTI ' => 'btb', |
1073 | 1117 | 'BTS ' => 'bts', |
1074 | 1118 | 'BUG ' => 'bug', |
1119 | "BYV " => 'byv', | |
1075 | 1120 | 'CAK ' => 'cak', |
1076 | 1121 | 'CAT ' => 'cat', |
1077 | 1122 | 'CBK ' => 'cbk', |
1144 | 1189 | 'FIN ' => 'fin', |
1145 | 1190 | 'FJI ' => 'fij', |
1146 | 1191 | 'FLE ' => 'vls', |
1192 | "FMP " => 'fmp', | |
1147 | 1193 | 'FNE ' => 'enf', |
1148 | 1194 | 'FON ' => 'fon', |
1149 | 1195 | 'FOS ' => 'fao', |
1220 | 1266 | 'JAN ' => 'jpn', |
1221 | 1267 | 'JAV ' => 'jav', |
1222 | 1268 | 'JBO ' => 'jbo', |
1269 | "JCT " => 'jct', | |
1223 | 1270 | 'JII ' => 'yid', |
1224 | 1271 | 'JUD ' => 'lad', |
1225 | 1272 | 'JUL ' => 'dyu', |
1255 | 1302 | 'KMN ' => 'kfy', |
1256 | 1303 | 'KMO ' => 'kmw', |
1257 | 1304 | 'KMS ' => 'kxc', |
1305 | "KMZ " => 'kmz', | |
1258 | 1306 | 'KNR ' => 'kau', |
1259 | 1307 | 'KOD ' => 'kfa', |
1260 | 1308 | 'KOH ' => 'okm', |
1331 | 1379 | 'MAR ' => 'mar', |
1332 | 1380 | 'MAW ' => 'mwr dhd rwr mve wry mtr swv', |
1333 | 1381 | 'MBN ' => 'kmb', |
1382 | "MBO " => 'mbo', | |
1334 | 1383 | 'MCH ' => 'mnc', |
1335 | 1384 | 'MCR ' => 'crm', |
1336 | 1385 | 'MDE ' => 'men', |
1398 | 1447 | 'NTO ' => 'epo', |
1399 | 1448 | 'NYM ' => 'nym', |
1400 | 1449 | 'NYN ' => 'nno', |
1450 | "NZA " => 'nza', | |
1401 | 1451 | 'OCI ' => 'oci', |
1402 | 1452 | 'OCR ' => 'ojs', |
1403 | 1453 | 'OJB ' => 'oji', |
1461 | 1511 | 'SAY ' => 'chp', |
1462 | 1512 | 'SCN ' => 'scn', |
1463 | 1513 | 'SCO ' => 'sco', |
1514 | "SCS " => 'scs', | |
1464 | 1515 | 'SEK ' => 'xan', |
1465 | 1516 | 'SEL ' => 'sel', |
1466 | 1517 | 'SGA ' => 'sga', |
1473 | 1524 | 'SIG ' => 'xst', |
1474 | 1525 | 'SKS ' => 'sms', |
1475 | 1526 | 'SKY ' => 'slk', |
1476 | 'SLA ' => 'scs', | |
1527 | "SLA " => 'scs xsl', | |
1477 | 1528 | 'SLV ' => 'slv', |
1478 | 1529 | 'SML ' => 'som', |
1479 | 1530 | 'SMO ' => 'smo', |
1636 | 1687 | |
1637 | 1688 | =head1 LICENSING |
1638 | 1689 | |
1639 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
1690 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
1640 | 1691 | |
1641 | 1692 | This module is released under the terms of the Artistic License 2.0. |
1642 | 1693 | For details, see the full text of the license in the file LICENSE. |
357 | 357 | |
358 | 358 | =head1 LICENSING |
359 | 359 | |
360 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
360 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
361 | 361 | |
362 | 362 | This module is released under the terms of the Artistic License 2.0. |
363 | 363 | For details, see the full text of the license in the file LICENSE. |
711 | 711 | |
712 | 712 | =head1 LICENSING |
713 | 713 | |
714 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
714 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
715 | 715 | |
716 | 716 | This module is released under the terms of the Artistic License 2.0. |
717 | 717 | For details, see the full text of the license in the file LICENSE. |
130 | 130 | |
131 | 131 | =head1 LICENSING |
132 | 132 | |
133 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
133 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
134 | 134 | |
135 | 135 | This module is released under the terms of the Artistic License 2.0. |
136 | 136 | For details, see the full text of the license in the file LICENSE. |
4445 | 4445 | |
4446 | 4446 | =head1 LICENSING |
4447 | 4447 | |
4448 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
4448 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
4449 | 4449 | |
4450 | 4450 | This module is released under the terms of the Artistic License 2.0. |
4451 | 4451 | For details, see the full text of the license in the file LICENSE. |
316 | 316 | |
317 | 317 | =head1 LICENSING |
318 | 318 | |
319 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
319 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
320 | 320 | |
321 | 321 | This module is released under the terms of the Artistic License 2.0. |
322 | 322 | For details, see the full text of the license in the file LICENSE. |
86 | 86 | |
87 | 87 | =head1 LICENSING |
88 | 88 | |
89 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
89 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
90 | 90 | |
91 | 91 | This module is released under the terms of the Artistic License 2.0. |
92 | 92 | For details, see the full text of the license in the file LICENSE. |
167 | 167 | |
168 | 168 | =head1 LICENSING |
169 | 169 | |
170 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
170 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
171 | 171 | |
172 | 172 | This module is released under the terms of the Artistic License 2.0. |
173 | 173 | For details, see the full text of the license in the file LICENSE. |
373 | 373 | |
374 | 374 | =head1 LICENSING |
375 | 375 | |
376 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
376 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
377 | 377 | |
378 | 378 | This module is released under the terms of the Artistic License 2.0. |
379 | 379 | For details, see the full text of the license in the file LICENSE. |
300 | 300 | ["pop_ret", 0, ""], ["ret_zero", 0, ""], ["ret_true", 0, ""], ["iattr_set", 2, "Sn"], # 48 |
301 | 301 | ["iattr_add", 2, "Sn"], ["iattr_sub", 2, "Sn"], ["push_proc_state", 1, "n"], ["push_version", 0, ""], |
302 | 302 | ["put_subs", 5, "sCcCc"], ["put_subs2", 4, "cscc"], ["put_subs3", 7, "scscscc"], ["put_glyph", 2, "Cc"], |
303 | ["push_glyph_attr", 3, "Ggs"], ["push_att_to_glyph_attr", 3, "Ggs"] ); | |
303 | ["push_glyph_attr", 3, "Ggs"], ["push_att_to_glyph_attr", 3, "Ggs"], ["bitand", 0, ""], ["bitor", 0, ""], | |
304 | ["bitnot", 0, ""], ["setbits", 4, "NnNn"], ["setfeat", 2, "fs"] ); # 64 | |
304 | 305 | |
305 | 306 | my ($i) = 0; |
306 | 307 | our %opnames = map {$_->[0] => $i++} @opcodes; |
365 | 366 | } |
366 | 367 | $fh->read($dat, 10); |
367 | 368 | ($silf->{'numLigComp'}, $silf->{'numUserAttr'}, $silf->{'maxCompPerLig'}, $silf->{'direction'}, |
368 | $d, $d, $d, $d, $numCritFeatures) = TTF_Unpack("SCCCCCCCC", $dat); | |
369 | $silf->{'attCollisions'}, $d, $d, $d, $numCritFeatures) = TTF_Unpack("SCCCCCCCC", $dat); | |
369 | 370 | if ($numCritFeatures) |
370 | 371 | { |
371 | 372 | $fh->read($dat, $numCritFeatures * 2); |
398 | 399 | $fh->read($dat, 4); |
399 | 400 | my ($numClasses, $numLinearClasses) = TTF_Unpack("SS", $dat); |
400 | 401 | $silf->{'numLinearClasses'} = $numLinearClasses; |
401 | $fh->read($dat, $numClasses * 2 + 2); | |
402 | @classo = unpack("n*", $dat); | |
402 | $fh->read($dat, ($numClasses + 1) * ($self->{'Version'} >= 4 ? 4 : 2)); | |
403 | @classo = unpack($self->{'Version'} >= 4 ? "N*" : "n*", $dat); | |
403 | 404 | $fh->read($dat, $classo[-1] - $classo[0]); |
404 | 405 | for ($i = 0; $i < $numLinearClasses; $i++) |
405 | 406 | { |
422 | 423 | |
423 | 424 | sub chopcode |
424 | 425 | { |
425 | my ($dest, $dat, $offsets) = @_; | |
426 | my ($dest, $dat, $offsets, $isconstraint) = @_; | |
426 | 427 | my ($last) = $offsets->[-1]; |
427 | 428 | my ($i); |
428 | 429 | |
429 | 430 | for ($i = $#{$offsets} - 1; $i >= 0; $i--) |
430 | 431 | { |
431 | if ($offsets->[$i] or $i == 0) | |
432 | if ((!$isconstraint || $offsets->[$i]) && $offsets->[$i] != $last) | |
432 | 433 | { |
433 | 434 | unshift(@{$dest}, substr($dat, $offsets->[$i], $last - $offsets->[$i])); |
434 | 435 | $last = $offsets->[$i]; |
446 | 447 | my ($d, $dat, $i, @orulemap, @oconstraints, @oactions, $numRanges); |
447 | 448 | |
448 | 449 | $fh->seek($offset + $base, 0); |
450 | # printf "pass base = %04X\n", $offset; | |
449 | 451 | push (@{$silf->{'PASS'}}, $pass); |
450 | 452 | $fh->read($dat, 40); |
451 | 453 | ($pass->{'flags'}, $pass->{'maxRuleLoop'}, $pass->{'maxRuleContext'}, $pass->{'maxBackup'}, |
473 | 475 | $fh->read($dat, $pass->{'numRules'}); |
474 | 476 | $pass->{'rulePreContexts'} = [unpack('C*', $dat)]; |
475 | 477 | $fh->read($dat, 3); |
476 | ($d, $pass->{'passConstraintLen'}) = TTF_Unpack("CS", $dat); | |
478 | ($pass->{'collisionThreshold'}, $pass->{'passConstraintLen'}) = TTF_Unpack("CS", $dat); | |
477 | 479 | $fh->read($dat, ($pass->{'numRules'} + 1) * 2); |
478 | 480 | @oconstraints = unpack('n*', $dat); |
479 | 481 | $fh->read($dat, ($pass->{'numRules'} + 1) * 2); |
488 | 490 | { $fh->read($pass->{'passConstraintCode'}, $pass->{'passConstraintLen'}); } |
489 | 491 | $fh->read($dat, $oconstraints[-1]); |
490 | 492 | $pass->{'constraintCode'} = []; |
491 | chopcode($pass->{'constraintCode'}, $dat, \@oconstraints); | |
493 | chopcode($pass->{'constraintCode'}, $dat, \@oconstraints, 1); | |
492 | 494 | $fh->read($dat, $oactions[-1]); |
493 | 495 | $pass->{'actionCode'} = []; |
494 | chopcode($pass->{'actionCode'}, $dat, \@oactions); | |
496 | chopcode($pass->{'actionCode'}, $dat, \@oactions, 0); | |
495 | 497 | return $pass; |
496 | 498 | } |
497 | 499 | |
604 | 606 | |
605 | 607 | sub packcode |
606 | 608 | { |
607 | my ($code) = @_; | |
609 | my ($code, $isconstraint) = @_; | |
608 | 610 | my ($dat, $c, $res); |
609 | 611 | |
612 | $c = 1; | |
613 | $dat = "\000"; | |
610 | 614 | foreach (@{$code}) |
611 | 615 | { |
612 | 616 | if ($_) |
616 | 620 | $c += length($_); |
617 | 621 | } |
618 | 622 | else |
619 | { push(@{$res}, 0); } | |
623 | { push(@{$res}, $isconstraint ? 0 : $c); } | |
620 | 624 | } |
621 | 625 | push(@{$res}, $c); |
622 | 626 | return ($res, $dat); |
629 | 633 | my (@offsets, $res, $pbase); |
630 | 634 | |
631 | 635 | $pbase = $fh->tell(); |
632 | # printf "pass base = %04X, ", $pbase - $subbase; | |
636 | # printf "pass base = %04X, ", $pbase - $subbase; | |
633 | 637 | $fh->print(TTF_Pack("CCCCSSLLLLSSSS", $pass->{'flags'}, $pass->{'maxRuleLoop'}, $pass->{'maxRuleContext'}, |
634 | 638 | $pass->{'maxBackup'}, $pass->{'numRules'}, 24, 0, 0, 0, 0, $pass->{'numRows'}, |
635 | 639 | $pass->{'numTransitional'}, $pass->{'numSuccess'}, $pass->{'numColumns'})); |
666 | 670 | $fh->print(pack("C*", @{$pass->{'rulePreContexts'}})); |
667 | 671 | $fh->print(TTF_Pack("CS", 0, $pass->{'passConstraintLen'})); |
668 | 672 | my ($oconstraints, $oactions); |
669 | ($oconstraints, $dat) = packcode($pass->{'constraintCode'}); | |
670 | ($oactions, $actiondat) = packcode($pass->{'actionCode'}); | |
673 | ($oconstraints, $dat) = packcode($pass->{'constraintCode'}, 1); | |
674 | ($oactions, $actiondat) = packcode($pass->{'actionCode'}, 0); | |
671 | 675 | # printf "constraint offsets @ %X\n", $fh->tell(); |
672 | 676 | $fh->print(pack("n*", @{$oconstraints})); |
673 | 677 | # printf "action offsets @ %X\n", $fh->tell(); |
676 | 680 | foreach (@{$pass->{'fsm'}}) |
677 | 681 | { $fh->print(pack("n*", @{$_})); } |
678 | 682 | # printf "end of fsm @ %X\n", $fh->tell(); |
679 | $fh->print(pack("C", 0)); | |
683 | $fh->print(pack("C", $pass->{'collisionThreshold'})); | |
680 | 684 | push(@offsets, $fh->tell() - $subbase); |
681 | 685 | $fh->print($pass->{'passConstraintCode'}); |
682 | 686 | push(@offsets, $fh->tell() - $subbase); |
684 | 688 | push(@offsets, $fh->tell() - $subbase); |
685 | 689 | $fh->print($actiondat); |
686 | 690 | push(@offsets, 0); |
691 | print join(", ", @offsets) . "\n"; | |
687 | 692 | $res = $fh->tell(); |
688 | 693 | $fh->seek($pbase + 8, 0); |
689 | 694 | $fh->print(pack("N*", @offsets)); |
714 | 719 | { |
715 | 720 | my ($subbase) = $fh->tell(); |
716 | 721 | my ($numlin, $i, @opasses, $oPasses, $oPseudo, $ooPasses); |
717 | if ($self->{'Version'} > 3) | |
722 | if ($self->{'Version'} >= 3) | |
718 | 723 | { |
719 | 724 | $fh->seek($base + 12 + $silfc * 4, 0); |
720 | 725 | $fh->print(pack('N', $subbase - $base)); |
721 | 726 | $fh->seek($subbase, 0); |
722 | $fh->print(TTF_Pack("vSS", $silf->{'Version'}, $oPasses, $oPseudo)); | |
727 | $fh->print(TTF_Pack("vSS", $silf->{'Version'}, $ooPasses, $oPseudo)); | |
723 | 728 | } |
724 | 729 | else |
725 | 730 | { |
737 | 742 | $_->{'attrWeight'}, $_->{'runto'}, 0, 0, 0)); } |
738 | 743 | |
739 | 744 | $fh->print(TTF_Pack("SCCCCCCCC", $silf->{'numLigComp'}, $silf->{'numUserAttr'}, $silf->{'maxCompPerLig'}, |
740 | $silf->{'direction'}, 0, 0, 0, 0, $#{$silf->{'CRIT_FEATURE'}} + 1)); | |
745 | $silf->{'direction'}, $silf->{'attCollisions'}, 0, 0, 0, $#{$silf->{'CRIT_FEATURE'}} + 1)); | |
741 | 746 | $fh->print(pack("n*", @{$silf->{'CRIT_FEATURE'}})); |
742 | 747 | $fh->print(TTF_Pack("CC", 0, $#{$silf->{'scripts'}} + 1)); |
743 | 748 | foreach (@{$self->{'scripts'}}) |
745 | 750 | $fh->print(TTF_Pack("S", $silf->{'lbGID'})); |
746 | 751 | $ooPasses = $fh->tell(); |
747 | 752 | if ($silf->{'PASS'}) { $fh->print(pack("N*", (0) x (@{$silf->{'PASS'}} + 1)));} |
753 | $oPseudo = $fh->tell() - $subbase; | |
748 | 754 | my (@pskeys) = keys %{$silf->{'pseudos'}}; |
749 | 755 | $fh->print(TTF_Pack("SSSS", TTF_bininfo(scalar @pskeys, 6))); |
750 | $oPseudo = $fh->tell() - $subbase; | |
751 | 756 | foreach my $k (sort {$a <=> $b} @pskeys) |
752 | 757 | { $fh->print(TTF_Pack("Ls", $k, $silf->{'pseudos'}{$k})); } |
753 | 758 | $numlin = $silf->{'numLinearClasses'}; |
754 | 759 | $fh->print(TTF_Pack("SS", scalar @{$silf->{'classes'}}, $numlin)); |
755 | 760 | my (@coffsets); |
761 | # printf "%X, ", $fh->tell() - $base; | |
756 | 762 | my ($cbase) = (scalar @{$silf->{'classes'}} + 1) * ($self->{'Version'} >= 4 ? 4 : 2) + 4; |
757 | 763 | for ($i = 0; $i < $numlin; $i++) |
758 | 764 | { |
759 | 765 | push (@coffsets, $cbase); |
760 | 766 | $cbase += 2 * scalar @{$silf->{'classes'}[$i]}; |
761 | 767 | } |
768 | my (@nonlinclasses); | |
762 | 769 | for ($i = $numlin; $i < @{$silf->{'classes'}}; $i++) |
763 | 770 | { |
771 | my (@c, $d, @d); | |
772 | my $c = $silf->{'classes'}[$i]; | |
764 | 773 | push (@coffsets, $cbase); |
765 | my ($len) = scalar @{$silf->{'classes'}[$i]}; | |
766 | $cbase += 8 + 4 * $len; | |
774 | @c = sort {$c->[$a] <=> $c->[$b]} (0 .. $#{$c}); | |
775 | foreach $d (@c) | |
776 | { push (@d, $c->[$d], $d); } | |
777 | push (@nonlinclasses, [@d]); | |
778 | my ($len) = scalar @d; | |
779 | $cbase += 8 + 2 * $len; | |
767 | 780 | } |
768 | 781 | push (@coffsets, $cbase); |
769 | 782 | $fh->print(pack(($self->{'Version'} >= 4 ? 'N*' : 'n*'), @coffsets)); |
770 | 783 | for ($i = 0; $i < $numlin; $i++) |
771 | 784 | { $fh->print(pack("n*", @{$silf->{'classes'}[$i]})); } |
785 | # printf "%X, ", $fh->tell() - $base; | |
772 | 786 | for ($i = $numlin; $i < @{$silf->{'classes'}}; $i++) |
773 | 787 | { |
774 | my ($num) = scalar @{$silf->{'classes'}[$i]}; | |
775 | my (@bin) = TTF_bininfo($num, 1); | |
788 | ||
789 | my ($num) = scalar @{$nonlinclasses[$i-$numlin]}; | |
790 | my (@bin) = TTF_bininfo($num/2, 1); | |
776 | 791 | $fh->print(TTF_Pack("SSSS", @bin)); |
777 | my ($j) = 0; | |
778 | my (@dat) = map {[$_, $j++]} @{$silf->{'classes'}[$i]}; | |
779 | foreach (sort {$a->[0] <=> $b->[0] || $a->[1] <=> $b->[1]} @dat) | |
780 | { $fh->print(TTF_Pack("SS", $_->[0], $_->[1])); } | |
792 | $fh->print(pack("n*", @{$nonlinclasses[$i-$numlin]})); | |
781 | 793 | } |
782 | 794 | $oPasses = $fh->tell() - $subbase; |
783 | 795 | # printf "original pass = %04X\n", $oPasses; |
790 | 802 | if ($self->{'Version'} >= 3) |
791 | 803 | { |
792 | 804 | $fh->seek($subbase + 4, 0); |
793 | $fh->print(TTF_Pack("SS", $oPasses, $oPseudo)); | |
805 | $fh->print(TTF_Pack("SS", $ooPasses - $subbase, $oPseudo)); | |
794 | 806 | } |
795 | 807 | $fh->seek($end, 0); |
796 | 808 | $silfc++; |
877 | 889 | |
878 | 890 | =head1 LICENSING |
879 | 891 | |
880 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
892 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
881 | 893 | |
882 | 894 | This module is released under the terms of the Artistic License 2.0. |
883 | 895 | For details, see the full text of the license in the file LICENSE. |
131 | 131 | |
132 | 132 | =head1 LICENSING |
133 | 133 | |
134 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
134 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
135 | 135 | |
136 | 136 | This module is released under the terms of the Artistic License 2.0. |
137 | 137 | For details, see the full text of the license in the file LICENSE. |
451 | 451 | |
452 | 452 | =head1 LICENSING |
453 | 453 | |
454 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
454 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
455 | 455 | |
456 | 456 | This module is released under the terms of the Artistic License 2.0. |
457 | 457 | For details, see the full text of the license in the file LICENSE. |
163 | 163 | |
164 | 164 | =head1 LICENSING |
165 | 165 | |
166 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
166 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
167 | 167 | |
168 | 168 | This module is released under the terms of the Artistic License 2.0. |
169 | 169 | For details, see the full text of the license in the file LICENSE. |
650 | 650 | $tag->{' OFFSET'} = $fh->tell() - $base - $oLook; # offset to this extension lookup |
651 | 651 | # LookupTable (including actual offsets to subtables) |
652 | 652 | $fh->print(pack("nnn", $ext, $tag->{'FLAG'}, $nSub)); |
653 | $fh->print(pack("n*", map {6 + $nSub * 2 + $_ * 8 + $tag->{'FLAG'} & 0x0010 ? 2 : 0 } (0 .. $nSub-1))); | |
653 | $fh->print(pack("n*", map {6 + $nSub * 2 + $_ * 8 + ($tag->{'FLAG'} & 0x0010 ? 2 : 0) } (0 .. $nSub-1))); | |
654 | 654 | $fh->print(pack("n", $tag->{'FILTER'})) if $tag->{'FLAG'} & 0x0010; |
655 | 655 | $tag->{' EXT_OFFSET'} = $fh->tell(); # = first extension lookup subtable |
656 | 656 | for ($k = 0; $k < $nSub; $k++) |
1333 | 1333 | |
1334 | 1334 | =head1 LICENSING |
1335 | 1335 | |
1336 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
1336 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
1337 | 1337 | |
1338 | 1338 | This module is released under the terms of the Artistic License 2.0. |
1339 | 1339 | For details, see the full text of the license in the file LICENSE. |
91 | 91 | |
92 | 92 | =head1 LICENSING |
93 | 93 | |
94 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
94 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
95 | 95 | |
96 | 96 | This module is released under the terms of the Artistic License 2.0. |
97 | 97 | For details, see the full text of the license in the file LICENSE. |
139 | 139 | { |
140 | 140 | ($res, $frac) = unpack("nn", $dat); |
141 | 141 | substr($dat, 0, 4) = ""; |
142 | $res -= 65536 if $res > 32767; | |
143 | $res = sprintf("%d.%X", $res, $frac); | |
142 | $res = sprintf("%d.%04X", $res, $frac); | |
144 | 143 | } |
145 | 144 | elsif ($type eq "F") |
146 | 145 | { |
239 | 238 | } |
240 | 239 | elsif ($type eq "v") |
241 | 240 | { |
242 | if ($res =~ s/\.(\d+)$//o) | |
241 | if ($res =~ s/\.([0-9a-f]+)$//oi) | |
243 | 242 | { |
244 | 243 | $frac = $1; |
245 | 244 | $frac .= "0" x (4 - length($frac)); |
627 | 626 | |
628 | 627 | =head1 LICENSING |
629 | 628 | |
630 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
629 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
631 | 630 | |
632 | 631 | This module is released under the terms of the Artistic License 2.0. |
633 | 632 | For details, see the full text of the license in the file LICENSE. |
168 | 168 | |
169 | 169 | =head1 LICENSING |
170 | 170 | |
171 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
171 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
172 | 172 | |
173 | 173 | This module is released under the terms of the Artistic License 2.0. |
174 | 174 | For details, see the full text of the license in the file LICENSE. |
83 | 83 | |
84 | 84 | =head1 LICENSING |
85 | 85 | |
86 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
86 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
87 | 87 | |
88 | 88 | This module is released under the terms of the Artistic License 2.0. |
89 | 89 | For details, see the full text of the license in the file LICENSE. |
38 | 38 | |
39 | 39 | =head1 LICENSING |
40 | 40 | |
41 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
41 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
42 | 42 | |
43 | 43 | This module is released under the terms of the Artistic License 2.0. |
44 | 44 | For details, see the full text of the license in the file LICENSE. |
22 | 22 | |
23 | 23 | =head1 LICENSING |
24 | 24 | |
25 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
25 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
26 | 26 | |
27 | 27 | This module is released under the terms of the Artistic License 2.0. |
28 | 28 | For details, see the full text of the license in the file LICENSE. |
22 | 22 | |
23 | 23 | =head1 LICENSING |
24 | 24 | |
25 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
25 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
26 | 26 | |
27 | 27 | This module is released under the terms of the Artistic License 2.0. |
28 | 28 | For details, see the full text of the license in the file LICENSE. |
50 | 50 | |
51 | 51 | =head1 LICENSING |
52 | 52 | |
53 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
53 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
54 | 54 | |
55 | 55 | This module is released under the terms of the Artistic License 2.0. |
56 | 56 | For details, see the full text of the license in the file LICENSE. |
181 | 181 | |
182 | 182 | =head1 LICENSING |
183 | 183 | |
184 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
184 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
185 | 185 | |
186 | 186 | This module is released under the terms of the Artistic License 2.0. |
187 | 187 | For details, see the full text of the license in the file LICENSE. |
0 | 0 | package Font::TTF; |
1 | 1 | |
2 | $VERSION = '1.05'; # MJPH 19-Jan-2015 Bug fixes; updated OT tags; GSUB Lookup Type 8 support | |
2 | $VERSION = '1.06'; # RMH 02-Aug-2016 Bug fixes; updated OT tags; | |
3 | # $VERSION = '1.05'; # MJPH 19-Jan-2015 Bug fixes; updated OT tags; GSUB Lookup Type 8 support | |
3 | 4 | # $VERSION = '1.04'; # MJPH 8-Jan-2014 License, POD, and perl -w tidying; bug fixes |
4 | 5 | # $VERSION = '1.03'; # MJPH 5-Sep-2013 Add $t->minsize() |
5 | 6 | # $VERSION = '1.02'; # MJPH 30-Aug-2012 Fix case typo in Useall |
34 | 35 | Martin Hosken L<http://scripts.sil.org/FontUtils>. |
35 | 36 | (see CONTRIBUTORS for other authors). |
36 | 37 | |
38 | Repository available at L<https://github.com/silnrsi/font-ttf.git> | |
39 | ||
40 | =head1 HISTORY | |
41 | ||
42 | See F<Changes> file for a change log. | |
43 | ||
37 | 44 | =head1 LICENSING |
38 | 45 | |
39 | Copyright (c) 1998-2015, SIL International (http://www.sil.org) | |
46 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
40 | 47 | |
41 | 48 | This module is released under the terms of the Artistic License 2.0. |
42 | 49 | For details, see the full text of the license in the file LICENSE. |
43 | 50 | |
44 | . | |
51 | The fonts in the test suite are released under the Open Font License 1.1, see F<t/OFL.txt>. | |
52 | ||
53 | ||
54 | =head1 SEE ALSO | |
55 | ||
56 | L<Font::TTF::Font> | |
45 | 57 | |
46 | 58 | =cut |
178 | 178 | |
179 | 179 | =head1 LICENSING |
180 | 180 | |
181 | Copyright (c) 1998-2014, SIL International (http://www.sil.org) | |
181 | Copyright (c) 1998-2016, SIL International (http://www.sil.org) | |
182 | 182 | |
183 | 183 | This script is released under the terms of the Artistic License 2.0. |
184 | 184 | For details, see the full text of the license in the file LICENSE. |