<p>The collection of fonts available to a web developer is depressingly limited. I remember reading long ago about TrueDoc, as a way of shipping fonts alongside a website - but it seems to have languished. Has anybody used this, or something similar? Is it supported by enough browsers? Am I missing a good solution?</p>

<p>Note that a responsible web developer does not use fonts that are only available on Windows (and <em>especially</em> ones that are only available on Vista), nor do they use a technology that isn't supported by at least the majority of browsers.</p>

<hr>

<p><strong>Update:</strong> As several people have pointed out, there's nothing wrong with providing a list of fallback fonts for people who don't have the specific font you use. I do in fact always do this, and didn't mean to suggest that this was wrong.</p>

<p>While my question was badly phrased, what I meant was that a designer should not make too many assumptions about what the client will have available. You should plan for how all users will see your site, not just for people using your own preferred setup.</p>

[{'answer_id': 16247, 'author': 'Sven Hecht', 'author_id': 1168, 'author_profile': 'https://Stackoverflow.com/users/1168', 'pm_score': 1, 'selected': False, 'text': '<p>CSS2 offers:</p>\n\n<pre class="lang-css prettyprint-override"><code>@font-face {\n    font-family: Garamond;\n    src: url(garamond.eot), url(garamond.pfr);\n}\n</code></pre>\n'}, {'answer_id': 16254, 'author': 'Nicolas', 'author_id': 1730, 'author_profile': 'https://Stackoverflow.com/users/1730', 'pm_score': 0, 'selected': False, 'text': "<blockquote>\n  <p>Note that a responsible web developer does not use fonts that are only available on Windows (and especially ones that are only available on Vista), nor do they use a technology that isn't supported by at least the majority of browsers.</p>\n</blockquote>\n\n<p>Well… You can, as long as you know how it will render on non-Vista/non-Windows OS.</p>\n\n<p>Otherwise: yep, @font-face in CSS2 is the best standard alternative, even if it is not widely supported.</p>\n"}, {'answer_id': 16255, 'author': 'Ian Oxley', 'author_id': 1904, 'author_profile': 'https://Stackoverflow.com/users/1904', 'pm_score': 5, 'selected': True, 'text': '<p>Safari, and to a lesser extent, Firefox 3 have support for <code>@font-face</code> in CSS, which lets you use custom fonts. You need to have the appropriate licence to distribute the font files though. These articles explain it in more detail:</p>\n\n<ul>\n<li><a href="http://www.css3.info/preview/web-fonts-with-font-face/" rel="noreferrer">http://www.css3.info/preview/web-fonts-with-font-face/</a></li>\n<li><a href="http://www.alistapart.com/articles/cssatten" rel="noreferrer">http://www.alistapart.com/articles/cssatten</a></li>\n<li><a href="http://www.sitepoint.com/blogs/2008/07/30/custom-web-fonts-pick-your-poison/" rel="noreferrer">http://www.sitepoint.com/blogs/2008/07/30/custom-web-fonts-pick-your-poison/</a></li>\n</ul>\n'}, {'answer_id': 16456, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<blockquote>\n  <p>Note that a responsible web developer does not use fonts that are only\n  available on Windows (and especially ones that are only available on\n  Vista), nor do they use a technology that isn\'t supported by at least\n  the majority of browsers.</p>\n</blockquote>\n\n<p>There\'s nothing wrong or incorrect about using Windows/Vista-specific fonts provided you gracefully degrade to a widely-available font. For example:</p>\n\n<pre class="lang-css prettyprint-override"><code>font-family: Calibri, Tahoma, Helvetica, Sans-Serif;\n</code></pre>\n\n<p>In fact that\'s the whole point!</p>\n'}, {'answer_id': 16525, 'author': 'Tim', 'author_id': 1970, 'author_profile': 'https://Stackoverflow.com/users/1970', 'pm_score': 2, 'selected': False, 'text': '<p>You can of course use <a href="http://www.mikeindustries.com/blog/sifr/" rel="nofollow noreferrer">SIFR</a>.</p>\n\n<p>This degrades gracefully in browsers that do not support it and is accessible.</p>\n\n<p>It\'s not really suitable for using on loads of text but for headings and highlight text it\'s perfect.</p>\n\n<p>Of course this is a work around to an intrinsic limitation of browsers and the web at this time, but when was this not the case for the majority of web technologies and techniques.</p>\n'}, {'answer_id': 16532, 'author': 'Jeff Atwood', 'author_id': 1, 'author_profile': 'https://Stackoverflow.com/users/1', 'pm_score': 4, 'selected': False, 'text': '<p>This is a timely thread; we switched to Arial because Calibri is WAY small compared to all the other fallback fonts! It pained me greatly to switch to (gag) Arial because it\'s a crap copy of Helvetica:</p>\n\n<p><a href="http://www.ms-studio.com/articles.html" rel="noreferrer">http://www.ms-studio.com/articles.html</a></p>\n\n<p>The sizing difficulties (too big if you go with a "c" font as your standard; too small if you go with something normal) are described in detail here:</p>\n\n<p><a href="http://neosmart.net/blog/2006/css-vistas-new-fonts/" rel="noreferrer">http://neosmart.net/blog/2006/css-vistas-new-fonts/</a></p>\n\n<p>I will miss Calibri\'s beautiful hand-tuned RGB aliasing a lot, but it was just impossible to deliver a good experience for most users without demanding Calibri be installed. It\'s reasonably common, as it comes with Office 2007 (Win/Mac) and of course Vista.. but it\'s far from universal, so it\'s a little irresponsible to rely heavily on it for a global web audience.</p>\n'}, {'answer_id': 18150, 'author': 'John Sheehan', 'author_id': 1786, 'author_profile': 'https://Stackoverflow.com/users/1786', 'pm_score': 1, 'selected': False, 'text': '<p>IE supports <code>@font-face</code> (it started out as their proprietary technology in MS Word). <a href="http://blogs.msdn.com/ie/archive/2008/07/21/font-embedding-on-the-web.aspx" rel="nofollow noreferrer">Here\'s a blog post from the IE team about it just about a month ago</a>.</p>\n'}, {'answer_id': 18259, 'author': 'Polsonby', 'author_id': 137, 'author_profile': 'https://Stackoverflow.com/users/137', 'pm_score': 1, 'selected': False, 'text': '\n\n<blockquote>\n  <p>Note that a responsible web developer does not use fonts that are only available on Windows (and especially ones that are only available on Vista), nor do they use a technology that isn\'t supported by at least the majority of browsers.</p>\n</blockquote>\n\n<p>I think this is rather missing the point. It wouldn\'t matter if you did; everyone would get something sensible that they could read easily, and the ones who need to can change the font to whatever they want anyway because it\'s just text and all major browsers let you customise the font you see regardless of the preferences of the site designer.</p>\n\n<p>There is nothing broken about suggesting fonts in your CSS that some users don\'t have; they just see something different from you. Different is not broken. They won\'t even wonder why you\'re using default fonts because they won\'t know that other people see anything different.</p>\n\n<p>This is the whole point of font sets:</p>\n\n<pre class="lang-none prettyprint-override"><code>Verdana, Arial, Helvetica, sans-serif\n</code></pre>\n\n<p>It\'s good practice precisely because it acknowledges that people will see different things.</p>\n\n<p>This is good practice too:</p>\n\n<pre class="lang-none prettyprint-override"><code>Gill Sans, Verdana, Arial, Helvetica, sans-serif\n</code></pre>\n\n<p>So most people don\'t have Gill – who cares? They get a perfectly good site regardless.</p>\n\n<p>And this would be fine too, but a bit weird and lazy:</p>\n\n<pre class="lang-none prettyprint-override"><code>Gill Sans\n</code></pre>\n\n<p>Irresponsible web design is doing things like setting text as images without using alt text, not using interesting fonts in font sets.</p>\n'}, {'answer_id': 28669, 'author': 'marcas', 'author_id': 1352, 'author_profile': 'https://Stackoverflow.com/users/1352', 'pm_score': 0, 'selected': False, 'text': '<p>I\'d imagine any method of sending fonts with a web page would pose some sort of security risk. I have heard of methods where, in the case that the client doesn\'t have the required font, the text can be dynamically replaced with an image of or some sort a flash displayed. The only one like this I can find now is at <a href="http://www.alistapart.com/articles/dynatext" rel="nofollow noreferrer">AListApart</a> but it may already be redundant.\nSaid method would also require css, images and javascript to work and could be painful to implement across browsers.</p>\n'}, {'answer_id': 8691065, 'author': 'Ry-', 'author_id': 707111, 'author_profile': 'https://Stackoverflow.com/users/707111', 'pm_score': 2, 'selected': False, 'text': '<p>You can do that with the new <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face" rel="nofollow"><code>@font-face</code> declaration</a> available in CSS3. It has very good support for a CSS3 feature (i.e. since IE4), too.</p>\n\n<p>The general syntax is:</p>\n\n<pre class="lang-css prettyprint-override"><code>@font-face {\n    src: url(\'<em>path to your font</em>\') format(\'<em>woff|ttf|svg|eot|…</em>\');\n    font-family: <em>the name to use</em>;\n    font-weight: <em>an optional weight</em>;\n    font-style: <em>an optional style</em>;\n}</code></pre>\n\n<p>There\'s also <a href="http://www.fontsquirrel.com/fontface/generator" rel="nofollow">a generator available</a> that converts the font to multiple formats and creates the appropriate CSS.</p>\n\n<p>Nowadays, I would recommend providing only a WOFF file; it’s convenient, <a href="https://people.mozilla.org/~jkew/woff/" rel="nofollow">easy to create</a>.</p>\n\n<p>Also, make sure to quote the name of the format (e.g. <code>format(\'woff\')</code>); it won’t work on Firefox otherwise.</p>\n'}]
['https://Stackoverflow.com/questions/16233', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1000/']