PDA

View Full Version : custom font in ie



bule
08-26-2008, 02:13 PM
I tried using a custom font in a html document,
but IE6 fails to show it (FF and Opera show it fine):


#barcodediv {
position:absolute;
left:9px;
top:160px;
width:130px;
height:28px;
text-align:center;
z-index:40;
overflow:hidden;
vertical-align:baseline;
font-family:"Free 3 of 9";
font-size:28px;
}


<div id="barcodediv">*PAR7234931*</div>

This is a free barcode font. I need to print a user card with bar code on it.
Are there any workarounds for IE to show a custom font installed on the system?

Ulrich
08-26-2008, 03:09 PM
No problems here.

Ulrich

bule
08-26-2008, 03:25 PM
Hm, I've tested it in VMWare in IE7 and it works fine there as well. What could it be?

Thanks for the test, upeters .

Ulrich
08-26-2008, 03:36 PM
I have no idea... the bare HTML below works correctly. But as you use z-index, there could be some glitch that makes the barcode appear below another layer, and ending up as invisible, depending on the rest of the code and elements you have on the page.


<html>
<head>
<style type="text/css" media="screen">
#barcodediv {
position:absolute;
left:9px;
top:160px;
width:130px;
height:28px;
text-align:center;
z-index:40;
overflow:hidden;
vertical-align:baseline;
font-family:"Free 3 of 9";
font-size:28px;
}
</style>
</head>
<body>
<div id="barcodediv">*PAR7234931*</div>
</body>
</html>


Ulrich

bule
08-26-2008, 05:30 PM
No, my problem was that it was rendered as a text in IE, with default font.
But now, in the AMPS web object, it works fine... God knows.