From f8a73d1b6913cf02497098dc1bece37ec367aee1 Mon Sep 17 00:00:00 2001 From: Koichi KAMICHI Date: Fri, 10 Feb 2006 05:22:16 +0000 Subject: [PATCH] Fixed to use the output of fontforge for UnicodeRange and CodepageRange flags. --- makettf/makettf.cgi | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/makettf/makettf.cgi b/makettf/makettf.cgi index 441d4c8..a41acd6 100755 --- a/makettf/makettf.cgi +++ b/makettf/makettf.cgi @@ -124,34 +124,11 @@ sub makefont{ my $fdata = ""; my $fsize = 0; - my $i; my @bdata; open FH, "<$TEMP.ttf"; $fsize = -s FH; read FH, $fdata, $fsize; close FH; - @bdata = unpack("C*", $fdata); - for($i = 0; $i < $fsize - 23; $i++){ - if($bdata[$i] == ord("P") && $bdata[$i+1] == ord("f") && $bdata[$i+2] == ord("E") && $bdata[$i+3] == ord("d")){ - #$bdata[$i-5] = 0x10; - for($j = 0; $j < 16; $j++){ - if($unicoderange[$j] ne "--"){ - $bdata[$i-16+$j] = eval('0x'.$unicoderange[$j]); - } - } - #$bdata[$i+20] = 0x80; # Symbol - #$bdata[$i+21] = 0x02; # JIS/Japan - #$bdata[$i+22] = 0x00; - #$bdata[$i+23] = 0x03; # Latin 1 & 2 - for($j = 0; $j < 4; $j++){ - $bdata[$i+20+$j] = eval('0x'.$codepagerange[$j]); - } - } - } - $fdata = pack("C*", @bdata); - #open FH, ">./$fontname.ttf"; - #print FH $fdata; - #close FH; print <<"EOT"; Content-type: application/octet-stream Content-Disposition: attachment; filename = $fontname_en.ttf -- 1.7.10.4