Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pixel font in HTML/CSS

Tags:

html

pixel

fonts

I try pixel fonts from http://www.fontsquirrel.com/fonts/list/style/Pixel but It's not perfect in the browser and disable anti-aliasing is not an official CSS property (or don't find good sample).

I found this old question : Is it possible to disable anti-aliasing in CSS when using @font-face with pixel fonts?

And this JS http://devpro.it/pixelfont/ look very nice but default font is to small (make my own font is not a good deal). So I would like to know if there is something new or others tips (without swf).

Here is a test with font-face (on webkit, firefox don't ?) : http://b4d455.fr/font/

like image 596
benoît Avatar asked Sep 05 '12 09:09

benoît


People also ask

What is the pixel font?

Pixel fonts, often known as screen or bitmap fonts, are made out of little square shapes known as pixels. It shows letters in basic blocks rather than complicated curves, as most regular fonts do. This typography is ideal for online designs that require text legibility at small sizes.

What is Google font in CSS?

The Google fonts API makes it easier and quicker for everyone to use web-fonts. These fonts have been tested on various browser configurations. Instead of doing any programming, we simply have to add a special stylesheet link to our HTML document, then refers to the font family of our choice in the CSS style.


2 Answers

This might do what you want to some extent:

font-smooth: never;
-webkit-font-smoothing : none;
like image 198
Willem Mulder Avatar answered Sep 21 '22 00:09

Willem Mulder


I know I'm late, but Small Font lets you use this gladly.

Here's some working CSS with no links required:

body {font-family: "MS Pゴシック";}
<!--- Here's some HTML for the example --->
<h4>Small Font</h4>
<p>Small Font is a pixel font used by Windows when a font is too small to be displayed</p>
<h5>Recommended CSS:</h5>
<code>font-size: 75%;</code>
like image 39
lexio_dev Avatar answered Sep 19 '22 00:09

lexio_dev