Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OTF Font on web server?

Tags:

html

css

I wonder is it possbile to use otf fonts on web server? I am asking this question because the following font works well on localhost but does not when I upload it on IIS.

@font-face 
{
    font-family:"CustomArabicFont";
    src: url("fonts/NassimArabicTEST-Regular.otf");
    font-weight: normal;
    font-style: normal;
} 

This is how I am calling this font:

.custom-ar-font 
{
    font-family: CustomArabicFont, Tahoma;
    font-size: 18px;
}
like image 744
mrd Avatar asked Feb 25 '26 10:02

mrd


1 Answers

You'll need to configure the proper MIME types. OTF fonts should have a MIME-type of application/font-sfnt.

Check these links for implementation details:

  • http://sebduggan.com/blog/serving-web-fonts-from-iis/
  • http://codingstill.com/2013/01/set-mime-types-for-web-fonts-in-iis/
like image 161
imsky Avatar answered Feb 27 '26 01:02

imsky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!