Forum Discussion

Indra_Optus's avatar
13 years ago

Custom Font ?

Is it possible to have custom font in Lithium (either buy adding it to Lithium or sourcing it using external URL)? Our company use custom font and would like to use it in Lithium page.

 

We have SVG (Scalable Vector Graphic) files we use for this (for more info: http://www.w3.org/2000/svg).

 

Please let me know. Thanks.

  • You can simply embed your custom font via CSS:

    @font-face{
    font-family: MyFont;
    src: url('fonts/myfont.svg'); /* For IE */
    src: local('myfont'), url('fonts/myfont.svg#Font2') format(svg); /* For non-IE */
    }

    Not sure about SVG font support in IE though... I think the standard there is .EOT

    • MoniqueL's avatar
      MoniqueL
      Lithium Alumni (Retired)

      Lithium has helped several customers with the past integrate custom fonts into their community. Typically they have either used typekit or cufon.

       

      If your company was using and hosting a .EOT file and applying it with css on their .com, lithium could accommodate this so you could apply the custom font via css for the community, but lithium would still need to edit the apache config to allow the file type for .com domains (your community).

       

      Also, doing a quick search lead me to this chart. It looks like SVG is not supported by IE 9 and older or Firefox.

      http://caniuse.com/svg-fonts

      • Inactive User's avatar
        Inactive User

        I've tried using a Google font but it doesn't seem to work -- have I simply done something wrong or does Lithium block external file calls?