Question

I've researched this a fair bit and the answer I've found is that there is only a limited number of web fonts available which seems a bit old fashioned to me. Would it not be possible to upload a custom font to your web host and use javascript (or something else, forgive my ignorance and noobishness) to read the custom font so when a visitor comes to your site it doesn't matter that they don't have your custom font installed it's just loaded off the site?

Was it helpful?

Solution 2

You can embed custom fonts using CSS.

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
  url('webfont.woff') format('woff'), /* Modern Browsers */
  url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
  url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}


body {
  font-family: 'MyFontFamily', Fallback, sans-serif;
}

source: css-tricks.com

OTHER TIPS

In your CSS :

@font-face {
    font-family: cool_font;
    src: url('cool_font.ttf');
}
p.custom_font{
    font-family: cool_font; /* no .ttf */
}

From http://www.howtoplaza.com/how-to-use-custom-fonts-on-your-website-with-css

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top