【发布时间】:2011-06-17 07:43:17
【问题描述】:
我正在尝试为我公司的主页设计一些文本。文本在 IE8 中看起来不错,但在 Firefox 或 Chrome 中看起来不太好。
在 Firefox 中,每个字符的右侧似乎有一些额外的白色像素。 在 chrome 中,效果相似,但并非所有字母都发生。
<!DOCTYPE html>
<html lang="en">
<head>
<script src="js/raphael-min.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload = function () {
var paper = Raphael(10, 0, 600, 400);
var lbl = paper.text(135, 40, "AaEeIiOoUuYy").attr( {
"font" : '36px Franklin Gothic Medium, Helvetica, Arial',
stroke : "#000",
fill : '#ffffff',
'font-weight' : 'bold',
'text-anchor' : 'start',
'stroke-opacity' : .9
});
var lbl = paper.text(0, 90, "AaEeIiOoUuYy").attr( {
"font" : '62px Franklin Gothic Medium, Helvetica, Arial',
stroke : "#000",
fill : '#ffffff',
'font-weight' : 'bold',
'text-anchor' : 'start',
'stroke-opacity' : .9
});
}
</script>
<style type="text/css">
#page
{
background: #000;
width:100%;
height: 600px;
}
</style>
</head>
<body>
<div id="page">
</div>
</body>
</html>
以下是显示问题的图片:
Firefox
IE8
Chrome
我正在使用拉斐尔 1.5.2。谢谢!
编辑:
我也愿意接受任何其他允许我显示带有细黑色轮廓(笔划)的特定字体的跨浏览器解决方案。
【问题讨论】:
标签: firefox google-chrome fonts svg raphael