...

View Full Version : Resolved How do I get my CSS to use my barcode font ??



mOrloff
12-14-2010, 11:22 PM
I have a simple test page, and I'm trying to get some of the content to print out in a 3of9 barcode font (39251.ttf) I downloaded and installed.
I tested the font in OpenOfcWriter, and everything checks out.

I installed that font on the host machine (local), and on my development machine.

The target line of code reads: <p class="barcode">12345678</p>
And here's an example of what I'm trying in my CSS: p.barcode{ font:39251; }
NOTE: Other adjustments such as p.barcode{ font-size-adjust:2; } and p.barcode{ color:red; } work just fine.

What am I missing??
~ Mo

wjrasmussen
12-15-2010, 12:23 AM
This is an example of something I have. You will need to modify it for your font.



.barcode {
font-family:"Barcode 3 of 9";
font-size:28.0pt;
mso-bidi-font-family:"Berlin Sans FB";
}

<p> <span class="barcode">*615$I*</span></p>

optimus203
12-15-2010, 01:55 AM
If that doesn't work, this CSS3 technique (http://www.zenelements.com/blog/css3-embed-font-face/) might help.

mOrloff
12-15-2010, 03:52 AM
Thanks WJ. That gave me enough info for me to figure it out.
For Posterity, here's what I've boiled down to: .barcode{ font-family:'Free 3 of 9', '39251'; }
(don't forget the quotes)

And Optimus, thanks for that CSS3 solution. I am definitely putting that to use when I come around to refactor (right now, though, I just need to get it done :)).

Thanks a bunch.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum