Indra_Optus
13 years agoGuide
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 S...
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
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.
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?
Hi Inactive User
are the fonts uploaded as assets in Studio and referenced using ${asset.get("...")} , or linked externally? Some browsers can prevent loading external fonts as a security risk (also depending on the settings) , thus preventing them from being viewed? Also, by any chance are you sourcing fonts over HTTP on a SSL page?
Lithium does not block external calls normally.
Hope it helps,