I can't find any font-family in CSS, which is similar to the font-family used in the CMD.exe. Could you please help me?
-
2`font-family: "Courier New", Courier, monospace` – Rudu Jan 11 '13 at 22:20
-
That particular font is called fixedsys, and it's apparently difficult to get working on a website: http://stackoverflow.com/questions/1513161/css-fixedsys-font-wont-appear-in-google-chrome-browser – Tom Smilack Jan 11 '13 at 22:31
4 Answers
You can use
font-family:monospace
to specify that you wish a monospaced font to be used.
The console uses a monospaced font to ensure that all characters have the same width.
Note that some browsers do not correctly implement monospaced, though there are approaches to fix that, e.g.
http://code.stephenmorley.org/html-and-css/fixing-browsers-broken-monospace-font-handling/

- 147,927
- 63
- 340
- 553
It is a bitmap-font like implementation in CMD.exe, so if you wanna try :
find a correct bitmap file (exemple: https://github.com/idispatch/raster-fonts)
then use a HTML5 canvas and play with your bitmap like this:
http://html5.santo.fr/index.php?post/2011/02/03/Tutorial-8-%3A-Hello-Word-with-BitMap-Font
Good luck ;)

- 444
- 4
- 5
By default, CSS doesn't provide a font that looks perfectly like the raster font of the command prompt.
It is possible to find some fonts that looks similar on dafont.com but those I found wasn't really monospaced (and force a not monospaced police is really ugly) then I found this site :

- 2,491
- 3
- 31
- 54
CSS3 supports Lucida console. Barring that, I don't know what you're on about.

- 33,938
- 5
- 80
- 91
-
1CSS3 has 'Lucida Console'? I didn't know CSS had built in fonts. – Kevin Boucher Jan 11 '13 at 22:45
-
Downvoted. "CSS3 supports Lucida console"? What are _you_ on about? – Armen Michaeli Mar 23 '16 at 16:54
-
@amn read OPs question and then my answer -- the question isn't clear, I indicated as such and gave an answer based on my understanding of the question, with the caveat that it wasn't clear and they should clarify. Did you actually bother to click through the link? – hd1 Mar 23 '16 at 17:05
-
Rest assured I read all three -- question, answer, and the linked article. Sorry, I just thought you chose a very peculiar title for your link and I thought I'd be appropriate to turn the dry English humor in your answer back on you. The text is clearly misleading, otherwise I would not downvote you. I am not a crook, just a pedant. – Armen Michaeli Mar 24 '16 at 01:04