rendered paste body% svn diff
Index: ttpostproc.pl
===================================================================
--- ttpostproc.pl (revision 1379)
+++ ttpostproc.pl (working copy)
@@ -33,7 +33,17 @@
# range[1].rangeGaspBehavior = 3 (GASP_DOGRAY|GASP_GRIDFIT)
$gasp_data = pack('nnnnnn', 0, 2, 8, 2, 0xffff, 3);
$font->{'gasp'} = Font::TTF::Table->new(( 'dat' => $gasp_data ));
-
+ print $font->{'OS/2'};
+ $font->{'OS/2'}->read;
+ if ($font->{'OS/2'}{'usWeightClass'} == 400) {
+ $font->{'OS/2'}{'fsSelection'} |= 64;
+ }
+ else {
+ $font->{'OS/2'}{'fsSelection'} &= ~64;
+ }
+# foreach my $key (keys $font->{'OS/2'}) {
+# print "$key";
+# }
$font->out($file) || die "Unable to write to $file : $!\n";
$font->release();
}