if(decodeURI(url.parse(req.url).pathname)=="/方正卡通简体.ttf"){ fs.readFile(“./方正卡通简体.ttf",Buffer,function(err,data){ zlib.gzip(data, function(err,buffer){ if(!err){ res.writeHead(200,{’Content-Type’:"application/x-font-ttf","Content-Length":data.length,"Accept-Encoding":’gzip’}); res.end(buffer,"binary”); } else{ console.log(err); } }) }) }
不能用 TAT