Jump to content

embedded TrueType font not working

Recommended Posts

I'm trying to "embed" a TrueType font using the CSS font-face facility. To do so, I copied the TrueType font files from the Windows/Fonts folder to a folder in my website directory. the corresponding CSS looks like this:

@font-face {
font-family: 'Comic Sans MS';
src: url(../../resources/fonts/comic.ttf) format('truetype'),
url(../../resources/fonts/comicbd.ttf) format('truetype'),
url(../../resources/fonts/comici.ttf) format('truetype'),
url(../../resources/fonts/comicz.ttf) format('truetype');

I've elected to use this technique to ensure that the appropriate typeface is displayed even on systems where the specified  typeface is not installed. Unfortunately, it does not appear to be working. On my system where I'm running Windows 10, the comic font is displayed…, that is, until I add the font-face construct. I have used this technique before to embed typefaces, but those were typefaces for which I acquired a license. I'm just wondering whether I have run up against a licensing issue. Perhaps I'm being presumptuous, but I thought I could (re)use the typefaces installed on my system. if I am mistaken, there's an easy remedy. Any feedback would be greatly appreciated.

By the way, in the event I need to purchase a license, does it matter which foundry I use?

Edited by babyboomer

Share this post

Link to post
Share on other sites

Which browser has the issue?

I know that Internet Explorer / Edge will refuse to show certain fonts if you haven't obtained a licensed version of it. You can tell if that's the case because The browser's console will show an error message about the font. If this is your problem, the solution to the problem is to modify the font file, here's a tool that can help fix font files: https://www.fontsquirrel.com/tools/webfont-generator

Share this post

Link to post
Share on other sites

Thank you, Ingolme!

To answer your question, it is the Internet Explorer browser with which I'm having the problem. Surprisingly, I'm not having this problem with Microsoft Edge.

I went to the font squirrel site to try converting the font (Comic Sans MS), only to discover that It has been "blacklisted."




Edited by babyboomer
content correction

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...