Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder mOrloff's Avatar
    Join Date
    Nov 2008
    Location
    The Great Pacific NW, USA
    Posts
    422
    Thanks
    8
    Thanked 6 Times in 6 Posts

    How do I get my CSS to use my barcode font ??

    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
    Last edited by mOrloff; 12-15-2010 at 03:53 AM.

  • #2
    New Coder
    Join Date
    May 2008
    Posts
    33
    Thanks
    11
    Thanked 0 Times in 0 Posts
    This is an example of something I have. You will need to modify it for your font.

    Code:
    .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>

  • #3
    Regular Coder optimus203's Avatar
    Join Date
    Sep 2008
    Location
    CT
    Posts
    317
    Thanks
    22
    Thanked 16 Times in 15 Posts
    If that doesn't work, this CSS3 technique might help.
    Always thank those CF Users who help you solve issues...
    Connecticut Web Design

  • #4
    Regular Coder mOrloff's Avatar
    Join Date
    Nov 2008
    Location
    The Great Pacific NW, USA
    Posts
    422
    Thanks
    8
    Thanked 6 Times in 6 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •