网页和条形码字体 [英] Web pages and barcode fonts
问题描述
我正在开发一个小应用程序,我可以生成条形码列表。我在我的电脑上安装了正确的字体。现在我把他们直接打印到一个网页,它可以正常工作在Chrome和IE 7,但不是Firefox。有没有人知道Firefox会不同于IE和Chrome?
I'm working on a small app where I can generate a list of barcodes. I have the correct fonts installed on my computer. Right now I am printing them directly to a webpage and it works properly in Chrome and IE 7, but not Firefox. Does anyone know what Firefox would be doing differently than IE and Chrome?
这里是我的代码:
<html>
<head>
<title>Barcode Font Test</title>
<style type="text/css" media="screen">
.barcode { font-family: "wasp 39 m", verdana, calibri; font-size: 36pt; }
</style>
</head>
<body>
<div class="barcode">*574656*</div>
</body>
</html>
EDIT:
我可能应该提到更多的是一个个人项目,而不是要释放到世界。虽然我会采取一个有效的解决方案,我想要一个不涉及Javascript / Flash / etc。
I probably should have mentioned that this is more of a personal project at the moment and not meant to be released to the world. While I will take a solution that works, I would like something that does not involve Javascript/Flash/etc.
推荐答案
解决方案可能是生成图像服务器端生成条形码。这样,您不必依赖安装了字体的用户,并且您不必访问HTML中的字体。
A simpler solution might be to generate images server side to generate the bar codes. That way you don't have to rely on the user having a font installed and you don't have to access the font in your html.
这篇关于网页和条形码字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!