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?
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, eg
http://code.stephenmorley.org/html-and-css/fixing-browsers-broken-monospace-font-handling/
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 ;)
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 :
CSS3 supports Lucida console . Barring that, I don't know what you're on about.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.