基本上我正在使用的Web字体在Firefox中显示过于大胆.我使用上面的代码在webkit浏览器中修复它.-moz-font-smoothing: antialiased; 不起作用.所以现在我问你们所有人是否有其他解决方案我只是忽略了.
注意:无论是否是h1字体仍然显示太粗体.
相关代码:
@font-face {
font-family: 'GelatoScript';
src: url('../fonts/gelatoscript/gelatoscript.eot');
src: url('../fonts/gelatoscript/gelatoscript.eot?#iefix') format('embedded-opentype'),
url('../fonts/gelatoscript/gelatoscript.woff') format('woff'),
url('../fonts/gelatoscript/gelatoscript.ttf') format('truetype'),
url('../fonts/gelatoscript/gelatoscript.svg#GelatoScript') format('svg');
font-weight: normal;
font-style: normal;
}
h1.pale {
color: #f6ff96;
font-family: 'GelatoScript';
font-weight: 100;
font-size: 3.5em;
margin-bottom: 0;
text-shadow: .042em .042em 0px #787878;
}
<h1 class="pale" >Check this out!</h1>
Run Code Online (Sandbox Code Playgroud) post '/upload' do
unless params[:file] && (tmpfile = params[:file][:tempfile]) && (name = params[:file][:filename])
return haml(:upload)
end
time = Time.now.to_s
time.gsub!(/\s/, '')
name = time + name
while blk = tmpfile.read(65536)
File.open(File.join(Dir.pwd,"public/uploads", name), "wb") { |f| f.write(tmpfile.read) }
end
'success'
end
Run Code Online (Sandbox Code Playgroud)
一切都在预期文件最终被破坏的地方.