Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. problem with font-face in fire fox

problem with font-face in fire fox

Scheduled Pinned Locked Moved ASP.NET
questionhelp
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    minaalamshahi
    wrote on last edited by
    #1

    what is problem of this code? dont work in fire fox onlu

    @font-face
    {
    font-family: 'B Yekan';
    src: url('../../../DirFont/Yekan.eot?#') format('eot'),
    url('../../../DirFont/Yekan.woff') format('woff'),
    url('../../../DirFont/Yekan.ttf') format('truetype');
    }

    body
    {
    font-family:'B Yekan' ,BYekan,Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    color: #666;

    font-size: 12px;
    line-height: 1.5em; 
    background-color: #eeeff3; background-repeat: repeat-x; background-position: top
    

    }

    J B 2 Replies Last reply
    0
    • M minaalamshahi

      what is problem of this code? dont work in fire fox onlu

      @font-face
      {
      font-family: 'B Yekan';
      src: url('../../../DirFont/Yekan.eot?#') format('eot'),
      url('../../../DirFont/Yekan.woff') format('woff'),
      url('../../../DirFont/Yekan.ttf') format('truetype');
      }

      body
      {
      font-family:'B Yekan' ,BYekan,Arial, Helvetica, sans-serif;
      margin: 0;
      padding: 0;
      color: #666;

      font-size: 12px;
      line-height: 1.5em; 
      background-color: #eeeff3; background-repeat: repeat-x; background-position: top
      

      }

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      I make a dedicated CSS file for each font, this is what I use and it works fine in all browsers, no complaints in 2 years.

      /* EN-US_Berylium.css */

      @font-face {
      font-family: 'beryliumRG';
      src: url('/fonts/Berylium/berylium_rg-webfont.eot');
      src: url('/fonts/Berylium/berylium_rg-webfont.eot?#iefix') format('embedded-opentype'),
      url('/fonts/Berylium/berylium_rg-webfont.woff') format('woff'),
      url('/fonts/Berylium/berylium_rg-webfont.ttf') format('truetype'),
      url('/fonts/Berylium/berylium_rg-webfont.svg#beryliumRG') format('svg');
      font-weight: normal;
      font-style: normal;

      }

      @font-face {
      font-family: 'beryliumRG_IT';
      src: url('/fonts/Berylium/berylium_rg_it-webfont.eot');
      src: url('/fonts/Berylium/berylium_rg_it-webfont.eot?#iefix') format('embedded-opentype'),
      url('/fonts/Berylium/berylium_rg_it-webfont.woff') format('woff'),
      url('/fonts/Berylium/berylium_rg_it-webfont.ttf') format('truetype'),
      url('/fonts/Berylium/berylium_rg_it-webfont.svg#beryliumRG_IT') format('svg');
      font-weight: normal;
      font-style: normal;

      }

      @font-face {
      font-family: 'berylium_BD';
      src: url('/fonts/Berylium/berylium_bd-webfont.eot');
      src: url('/fonts/Berylium/berylium_bd-webfont.eot?#iefix') format('embedded-opentype'),
      url('/fonts/Berylium/berylium_bd-webfont.woff') format('woff'),
      url('/fonts/Berylium/berylium_bd-webfont.ttf') format('truetype'),
      url('/fonts/Berylium/berylium_bd-webfont.svg#berylium_BD') format('svg');
      font-weight: normal;
      font-style: normal;

      }

      @font-face {
      font-family: 'beryliumBD_IT';
      src: url('/fonts/Berylium/berylium_bd_it-webfont.eot');
      src: url('/fonts/Berylium/berylium_bd_it-webfont.eot?#iefix') format('embedded-opentype'),
      url('/fonts/Berylium/berylium_bd_it-webfont.woff') format('woff'),
      url('/fonts/Berylium/berylium_bd_it-webfont.ttf') format('truetype'),
      url('/fonts/Berylium/berylium_bd_it-webfont.svg#beryliumBD_IT') format('svg');
      font-weight: normal;
      font-style: normal;

      }

      Then I use it in another CSS File

      .txt_BeryliumRG
      {
      color: rgb(0,0,0);
      font-family: "beryliumRG", Georgia, Serif;
      font-size: 1.2em;
      font-weight: normal;
      text-indent: 0.25em;
      text-align:justify;
      }

      B 1 Reply Last reply
      0
      • J jkirkerx

        I make a dedicated CSS file for each font, this is what I use and it works fine in all browsers, no complaints in 2 years.

        /* EN-US_Berylium.css */

        @font-face {
        font-family: 'beryliumRG';
        src: url('/fonts/Berylium/berylium_rg-webfont.eot');
        src: url('/fonts/Berylium/berylium_rg-webfont.eot?#iefix') format('embedded-opentype'),
        url('/fonts/Berylium/berylium_rg-webfont.woff') format('woff'),
        url('/fonts/Berylium/berylium_rg-webfont.ttf') format('truetype'),
        url('/fonts/Berylium/berylium_rg-webfont.svg#beryliumRG') format('svg');
        font-weight: normal;
        font-style: normal;

        }

        @font-face {
        font-family: 'beryliumRG_IT';
        src: url('/fonts/Berylium/berylium_rg_it-webfont.eot');
        src: url('/fonts/Berylium/berylium_rg_it-webfont.eot?#iefix') format('embedded-opentype'),
        url('/fonts/Berylium/berylium_rg_it-webfont.woff') format('woff'),
        url('/fonts/Berylium/berylium_rg_it-webfont.ttf') format('truetype'),
        url('/fonts/Berylium/berylium_rg_it-webfont.svg#beryliumRG_IT') format('svg');
        font-weight: normal;
        font-style: normal;

        }

        @font-face {
        font-family: 'berylium_BD';
        src: url('/fonts/Berylium/berylium_bd-webfont.eot');
        src: url('/fonts/Berylium/berylium_bd-webfont.eot?#iefix') format('embedded-opentype'),
        url('/fonts/Berylium/berylium_bd-webfont.woff') format('woff'),
        url('/fonts/Berylium/berylium_bd-webfont.ttf') format('truetype'),
        url('/fonts/Berylium/berylium_bd-webfont.svg#berylium_BD') format('svg');
        font-weight: normal;
        font-style: normal;

        }

        @font-face {
        font-family: 'beryliumBD_IT';
        src: url('/fonts/Berylium/berylium_bd_it-webfont.eot');
        src: url('/fonts/Berylium/berylium_bd_it-webfont.eot?#iefix') format('embedded-opentype'),
        url('/fonts/Berylium/berylium_bd_it-webfont.woff') format('woff'),
        url('/fonts/Berylium/berylium_bd_it-webfont.ttf') format('truetype'),
        url('/fonts/Berylium/berylium_bd_it-webfont.svg#beryliumBD_IT') format('svg');
        font-weight: normal;
        font-style: normal;

        }

        Then I use it in another CSS File

        .txt_BeryliumRG
        {
        color: rgb(0,0,0);
        font-family: "beryliumRG", Georgia, Serif;
        font-size: 1.2em;
        font-weight: normal;
        text-indent: 0.25em;
        text-align:justify;
        }

        B Offline
        B Offline
        Boipelo
        wrote on last edited by
        #3

        I am interested.., I normally get fonts as .ttf, do I also need them in .eot, .woff and .svg format? I read somewhere that all browsers support .ttf formats.

        I remain joe!

        J 1 Reply Last reply
        0
        • B Boipelo

          I am interested.., I normally get fonts as .ttf, do I also need them in .eot, .woff and .svg format? I read somewhere that all browsers support .ttf formats.

          I remain joe!

          J Offline
          J Offline
          jkirkerx
          wrote on last edited by
          #4

          You have to get all 4 versions of the font eot svg ttf woff There's a font website that will convert fonts to all 4 formats and you can download the font package in a zip file. [font squirrel^]

          1 Reply Last reply
          0
          • M minaalamshahi

            what is problem of this code? dont work in fire fox onlu

            @font-face
            {
            font-family: 'B Yekan';
            src: url('../../../DirFont/Yekan.eot?#') format('eot'),
            url('../../../DirFont/Yekan.woff') format('woff'),
            url('../../../DirFont/Yekan.ttf') format('truetype');
            }

            body
            {
            font-family:'B Yekan' ,BYekan,Arial, Helvetica, sans-serif;
            margin: 0;
            padding: 0;
            color: #666;

            font-size: 12px;
            line-height: 1.5em; 
            background-color: #eeeff3; background-repeat: repeat-x; background-position: top
            

            }

            B Offline
            B Offline
            Bernhard Hiller
            wrote on last edited by
            #5

            Two points to check: - space in name of font-family "B Yekan" - I'd prefer "BYekan" instead. - relative URL to the location: url('../../../DirFont/Yekan.ttf') format('truetype'); - I'd prefer an absolute URL instead: how do the browsers / the web server behave when you use too many "../"?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups