0

How do I use custom fonts (not google) with coldfusion.

In cfadmin there is the fonts setting - which looks straight forward enough..

but what do do in the page?

How can I use custom fonts on a website? suggests:

You have to import the font in your stylesheet like this:

@font-face{
    font-family: "Thonburi-Bold";
    src: url('Thonburi-Bold.ttf'),
    url('Thonburi-Bold.eot'); /* IE */
}

So what would I put for the src & url?

Thanks very much indeed.

Community
  • 1
  • 1
happysailingdude
  • 185
  • 1
  • 14
  • 1
    The font management page in the ColdFusion administrator is used to define fonts for use with Adobe FlashPaper and/or Acrobat PDF. I don't think that is what you are trying to do. Is it? ColdFusion runs on the server side. I'm guessing you want the fonts on the client side (browser). So just use the CSS as you found in the other question. – Miguel-F Jan 27 '15 at 21:40
  • Thanks @Miguel-F so what do I put as the url/src if it's not a google font? the one I want to use is Futura W02 - thanks very much indeed for any further help you (or anyone else) can provide. – happysailingdude Jan 27 '15 at 23:45
  • It's a CSS stuff and has nothing to do with ColdFusion. – Pankaj Jan 29 '15 at 08:43

1 Answers1

1

I sounds to me like what you're looking for is embedded fonts. The link you found sounds like the right answer. What I would do is create a folder for fonts in your web root (/fonts) and put all the font files there. Then you should be able to call it from anywhere in your site:

@font-face{
font-family: "Thonburi-Bold";
src: url('http://mywebsite.com/fonts/Thonburi-Bold.ttf'),
url('http://mywebsite.com/fonts/Thonburi-Bold.eot'); /* IE */
}

I hope that helps!

Leigh
  • 28,765
  • 10
  • 55
  • 103
John
  • 100
  • 1
  • 5