Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kevon K. Hayes 255 posts 281 karma points
    Aug 20, 2010 @ 16:31
    Kevon K. Hayes
    0

    @font-face doesn't appear to be working in Umbraco

    UMB 4.5.1 | WIN SVR 2008 STD

    Using the following allows the font to be downloaded by clients that do not have that particular font installed on there machine. Thus allowing be to have design consistency.

    This works perfectly in a page outside Umbraco, and I was wondering is there anything that could be obstructing this from working as should w/in Umbraco.

    /*myStyle.css*/

    @font-face {
      font-family: trajan pro;
      src: url(TrajanPro-Regular.otf) format("opentype");
    }

    body p
    {
       font-family: "trajan pro";
    }

  • dandrayne 1138 posts 2262 karma points
    Aug 20, 2010 @ 16:45
    dandrayne
    0

    Hi Kevon

    A few ideas here

    * Is this a path issue?  is your otf file inside the /css foder?
    * Perhaps a MIME issue?  If you link directly to your otf file in the browser do you get the correct response or a 404?

    Please post back if you get it resolved as I'd be interested to know the cause.  FWIW I've been using the fontsquirrel font-face generator before in umbraco 4.5 without issues -> http://www.fontsquirrel.com/fontface/generator

    Dan

  • Kevon K. Hayes 255 posts 281 karma points
    Aug 20, 2010 @ 17:41
    Kevon K. Hayes
    0

    I've actually copied the .otf to the .css, masterpages, and root directory to be sure. So it's a MIME issue as you suspected:

    HTTP Error 404.3 - Not Found
    The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

    so I'll be attempting to add a MIME Map in the web.config to see what the results yeild.  Question, and excuse my ignorance besides being ablt to produce a .eot for IE what's the win in using fontsquirrel? If all browsers (except IE) will obey this:

    @font-face{
    font-family:'Graublau Web';
    src: url('GraublauWeb.otf');
    }
  • dandrayne 1138 posts 2262 karma points
    Aug 20, 2010 @ 17:44
    dandrayne
    0

    The win is IE compatibility - For us poor souls who have to support IE6+ eot is great!

  • Kevon K. Hayes 255 posts 281 karma points
    Aug 20, 2010 @ 18:35
    Kevon K. Hayes
    0

    I added the mime types to the web.config and the fonts showed up!

  • Kevon K. Hayes 255 posts 281 karma points
    Aug 24, 2010 @ 23:39
    Kevon K. Hayes
    0

    IE8 Requires the .eot also... just in case anyone reads this.  If you're testing fonts and dont have a VMs for test enviroments delete your fonts from the font folder (after you've copied them off to a BU Folder somewhere). This should give you a jist of what the user experiences when they do not have the fonts installed

Please Sign in or register to post replies

Write your reply to:

Draft