special fonts on html page.

I want to use nicoluscochin fonts on
http://www.terracontinensmovie.com/poem.html

I have uploaded TTF file in fonts folder.
the CSS is as under.
<style>

@font-face {
  font-family: 'nicolascochin';
  src:  url('fonts/nicolascochin_regular.ttf') format('truetype'),
  font-weight: normal;
  font-style: normal;
}
body {
   font-family: nicolascochin;
}

</style>

Open in new window


but it does not show page text in that fonts. please help.
LVL 1
Rajesh JoshiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Prasadh BaapaatWeb Designer & DeveloperCommented:
Hi Rajesh,
just adding the TTF font does not make the font appear on the web page, you need WOFF,EOT,TTF,SVG files for displaying the font.

is the font you are trying to use "Nicolas Cochin"?

if yes, then the font has a WEBFONT which can be purchased from THIS WEBSITE

IF IT IS NOT the commercial font and is some other FREE font with similar name, you can use Web Font Generator to convert the TTF into WOFF,EOT,TTF,SVG and can use them on your website.

Hope it helps,
thanks,
Prasadh

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rajesh JoshiAuthor Commented:
Thank you Prasadh,
Please have a look at below lines.

@font-face{ 
	font-family: 'nicolascochin';
	src: url('fonts/nicolascochin_regular-webfont.eot');
	src: url('fonts/nicolascochin_regular-webfont.eot?#iefix') format('embedded-opentype'),
	     url('fonts/nicolascochin_regular-webfont.woff') format('woff'),
	     url('fonts/nicolascochin_regular-webfont.ttf') format('truetype'),
	     url('fonts/nicolascochin_regular-webfont.svg#webfont') format('svg');
}

Open in new window


Now in html should I use
body {
       font-family: nicolascochin;
}
or
body {
       font-family: nicolascochin_regular-webfont;
}

If I want to add ariel, times new roman as safe side what will be the coding?

Thanks and regards,
Rajesh.
Prasadh BaapaatWeb Designer & DeveloperCommented:
Hi Rajesh,
You can use either code with Arial or Times or both as below...

Arial and Times are both system fonts... so will be on all windows machines. the fonts are implemented from first to last... means if first font is not available, next one is applied and so on.

so you can include ANY ONE of below Code

body {
     font-family: 'nicolascochin', Arial, Helvetica, sans-serif;
}

body {
     font-family: 'nicolascochin',"Times New Roman", Times, serif;
}

body {
     font-family: 'nicolascochin', Arial, Helvetica, sans-serif, "Times New Roman", Times, serif;
}

Open in new window

Rajesh JoshiAuthor Commented:
Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.