Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a non-standard font file in .eot format and use the following CSS syntax to embed it into the master page:

@font-face
{
    font-family: Myfontfamily;
    src: url("http://server/_layouts/STYLES/Fonts/myfont.eot") format("embedded-opentype");
}

.customfont
{
    font-family: Myfontfamily;  
}

On my master page I have the following HTML:

<p class="customfont">Some random text</p>

It works fine, when used in a plain ASP.NET site (within the same IIS instance), but not in SharePoint. Custom font is not applied on the SharePoint master page. Do I need to make any additional actions for SharePoint? I also need this non-standard font to appear in the Content Editor web part, is it possible? Thx.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

I'm not sure, but could you change you're URL to point to relative path? In other words try to change your url to something like ("/_layout/STYLES/fonyts/myfont.eot")

share|improve this answer
    
you should also register your css files (csslink/cssregistration) within your file.master –  SunChero Jan 10 '12 at 15:21
    
How can i use sansa fonts. Will it work with sharepoint?Does microsoft support it? Cheers –  naijacoder Jan 11 '12 at 6:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.