1

I have a little problem in visual studio 2013. In my application (developed in html and javascript) i use a custom font. If i try to run my application on another pc (that didn't have installed the font) it doesn't see the font. For this reason,obviously,i can't put my app in the windows store.

Maybe i have to setting some things in Visual studio? This is the css code. Someone know what i have to do?

@font-face{
   font-family: 'custom_font';
   src: local('AngryBirds'), url('AngryBirds.ttf') format('truetype');
}
  • why not host the font on a webserver / cdn and use the url rather than relying on the font being on the local machine? This then means your app is dependant on an internet connection though. – martincarlin87 Apr 01 '14 at 13:42
  • possible duplicate of [Using custom fonts using css?](http://stackoverflow.com/questions/12144000/using-custom-fonts-using-css) – huMpty duMpty Apr 01 '14 at 13:47

1 Answers1

0

The secret here is in the src property:

src: local('AngryBirds'), url('AngryBirds.ttf') format('truetype');

You need to either host the font at a remote location accessible via the internet then change the url entry to this location, or you need to locate the font at the location on the local system as specified under local.

SW4
  • 69,876
  • 20
  • 132
  • 137