CSS font-family of cmd.exe

徘徊边缘 提交于 2021-01-27 15:56:57

问题


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?

console font


回答1:


CSS3 supports Lucida console. Barring that, I don't know what you're on about.




回答2:


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/




回答3:


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 ;)




回答4:


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 :

https://int10h.org/oldschool-pc-fonts/fontlist



来源:https://stackoverflow.com/questions/14287600/css-font-family-of-cmd-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!