From: Koichi KAMICHI Date: Fri, 10 Feb 2006 05:22:16 +0000 (+0000) Subject: Fixed to use the output of fontforge for UnicodeRange and CodepageRange flags. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8a73d1b6913cf02497098dc1bece37ec367aee1;p=chise%2Fkage.git Fixed to use the output of fontforge for UnicodeRange and CodepageRange flags. --- 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