Font2Web Solved The Issue That Customer Font Is Not Working In Ie

<Scenario>: We have the customer want to show their company’s font into web page. They provided me the ttf font file. I simply insert below code into main.css file,




@font-face {

    font-family: "Ericsson";

    src: url("EricssonCapitalTT.ttf");    

}



And defined two class in the header




#header h1

{

	margin: 10px 0 0 5px;		 

	font-family: "Ericsson", Helvetica; 

	color: #326; 

	font-size: 48px; 

	font-weight: normal

}

#header h2

{

	margin: -12px 0 0 22px;		 

	font-family: "Ericsson", Helvetica; 

	color: #326; 

	font-size: 16px; 

	font-weight: normal

}



It works well in Firefox, Chrome, Safari, but only not working in IE 9 or IE 10.

Then I searched in google, and from http://www.w3schools.com/cssref/css3_pr_font-face_rule.asp I got below information:

But the client did not provide me the .eot file. Because the client’s all other web page is working in IE, so I tracked the client’s page, and found the client is using .woff font file instead of ttf or otf file.

So I need a tool to convert ttf into woff.

Very luck, that I found one online tool to convert ttf font into woff. It’s

http://www.font2web.com/

After copy the new .woff font file into css/ folder, then add one more row into main.css, like below.




@font-face {

    font-family: "Ericsson";

    src: url("EricssonCapitalTT.woff"),

    url("EricssonCapitalTT.ttf");    

}



The issue fixed.

For someone may have same issue.

File Type Web Open Font Format File

Developer WebFonts Working Group

Popularity

4 stars

Category Font Files

File Format Description

Web font file created in the WOFF (Web Open Font Format) format, an open format used for delivering webpage fonts on the fly; saved as a compressed container and supports TrueType (.TTF) and OpenType (.OTF) fonts; also supports font licensing information.

WOFF files allow Web developers to use custom fonts rather than the standard Web fonts. Many browsers support the WOFF format, but most of them do not support WOFF files until recent versions.

NOTE: WOFF files are referenced within CSS files using the @font-face rule.