macos mac osx 字体,与默认的 xterm (X11) 字体一样可读和紧凑
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/379682/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Font for mac osx that is as readable and compact as the default xterm (X11) font
提问by dreeves
The font used in xterms is extremely compact yet readable. What font is that? The closest I've found that I can use in other other applications is DejaVu Sans Mono or Bitstream Vera Sans Mono. Those are as compact as xterms vertically but take up more space horizontally.
xterms 中使用的字体非常紧凑但可读。那是什么字体?我发现可以在其他应用程序中使用的最接近的是 DejaVu Sans Mono 或 Bitstream Vera Sans Mono。它们在垂直方向上与 xterms 一样紧凑,但在水平方向上占用更多空间。
I'd really like to switch from xterms to Terminal.app and this is the one thing holding me back.
我真的很想从 xterms 切换到 Terminal.app,这是阻碍我前进的一件事。
(I also think that font would be much better for emacs, xcode, or whatever editor.)
(我也认为该字体对于 emacs、xcode 或任何编辑器会更好。)
ADDED: In Terminal.app you can adjust the character and line spacing for any font. Is this possible in other applications?
添加:在 Terminal.app 中,您可以调整任何字体的字符和行距。这在其他应用程序中可能吗?
I'm open to any other font that is as compact and readable as the xterm font. Dina looks really nice but it doesn't seem to work for Mac.
我对任何其他与 xterm 字体一样紧凑和可读的字体持开放态度。Dina 看起来非常漂亮,但它似乎不适用于 Mac。
回答by Marty Vona
I have successfully gotten Emacs.App to use the beloved misc-fixed 7x14 font. And it looks GOOD.
我已经成功地让 Emacs.App 使用心爱的 misc-fixed 7x14 字体。它看起来不错。
1) download ucs-fonts.tar.gz from http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html
1) 从http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html下载 ucs-fonts.tar.gz
2) extract the file 7x14.bdf
2)解压文件7x14.bdf
3) install FontForge (fontforge.sourceforge.net)
3) 安装 FontForge (fontforge.sourceforge.net)
4) open 7x14.bdf in fontforge
4) 在 fontforge 中打开 7x14.bdf
5) in fontforge do File->Generate Fonts with "No Outline Font" and "Apple bitmap only sfont (dfont)"
5) 在 fontforge 中执行 File->Generate Fonts with "No Outline Font" 和 "Apple bitmap only sfont (dfont)"
6) save as /Library/Fonts/FixedMedium7x14.dfont
6)另存为/Library/Fonts/FixedMedium7x14.dfont
7) in your .emacs (setq default-font "-apple-Fixed-medium-normal-normal--14----m-0-iso10646-1")
7) 在你的 .emacs (setq default-font "-apple-Fixed-medium-normal-normal- -14-- --m-0-iso10646-1")
8) WIN
8) 赢
回答by Will Robertson
I've really taken a liking to Inconsolata:
http://www.levien.com/type/myfonts/inconsolata.html
But it's not really appropriate for an xterm. Better as a programming font.
我真的很喜欢 Inconsolata:
http: //www.levien.com/type/myfonts/inconsolata.html
但它并不适合 xterm。作为编程字体更好。
I'd strongly suggest Monaco 9pt, not anti-aliased:
我强烈建议使用 Monaco 9pt,而不是抗锯齿:
Never seen anything as readable and space-efficient. Note that it's the same number of pixels wide as Monaco 10, but slightly shorter.
从未见过任何可读和节省空间的东西。请注意,它的像素数与 Monaco 10 的像素数相同,但略短。
回答by nobody
It's not exactlythe same, but 10 point Monaco (with anti-aliasing turned off) is pretty darn close. I'd say it's actually a little better, because Monaco's 1/l and O/0 glyphs are more distinct than the X font's.
这并不完全相同,但 10 点摩纳哥(关闭抗锯齿)非常接近。我会说它实际上要好一点,因为摩纳哥的 1/l 和 O/0 字形比 X 字体更明显。
回答by dreeves
Here are alternatives I've tried. (Thanks to Will and others.)
这是我尝试过的替代方案。(感谢 Will 和其他人。)
Monaco 10pt with .9 line spacing (I don't know how to squish line or character spacing in anything other than Terminal.app) takes up exactly as much vertical and horizontal space as the xterm font. Without the line space squishing it takes up more vertical space. I don't think the squishing harms readability. Monaco has the advantage of slashed zeros but has worse angle brackets (they bump into adjacent characters awkardly, eg, "~>"). Upper case characters ("A" in particular) also don't look as good in Monaco. Mostly though, they are about the same.
Monaco 9pt fixes the angle brackets and is more vertically compact than the xterm font (same horizontally). Capital I is pretty sucky (hard to distinguish from l and i and |).
ProggyTiny from Proggy Fontsat 11pt. Setting the line spacing to .9 makes it vertically slightly more compact than X11's xterm font. Either way, it takes up exactly as much space horizontally. With or without line space squishing though, I find this option definitively worse than Monaco. The other Proggy varieties seem to not be as compact as the xterm font.
Anonymousat 10pt with .95 character spacing (I still don't know how to squish character or line spacing in anything but Terminal.app) and normal line spacing is exactly the same size as the X11 font. Squishing the character spacing causes upper case characters to touch each other very slightly and numbers are rather ugly that way. With vertical (line) space squishing it can be made more vertically compact than the xterm font without harming readability. (Anonymous at 9pt is very very compact and still quite readable.) I really don't like the caret ("^") in this font, with or without squishing.
FixedMedium6x13set to size 13 and line spacing 0.80 yields the xterm font exactly. My friend David Yangreports that this works flawlessly for him on Snow Leopard. I'm on Leopard and it's unusable for me (with squished line spacing that makes it as compact as X11) because there's some kind of refresh problem -- it cuts off the tops of the letters until the terminal window re-renders, like when you alt-tab away from it.
Monaco 10pt 与 .9 行间距(我不知道如何在 Terminal.app 以外的任何东西中压缩行或字符间距)占用的垂直和水平空间与 xterm 字体完全一样。如果没有压扁线空间,它会占用更多的垂直空间。我不认为压扁会损害可读性。Monaco 具有斜线零的优点,但尖括号更差(它们笨拙地撞到相邻的字符,例如“~>”)。大写字符(特别是“A”)在摩纳哥看起来也不那么好。大多数情况下,它们大致相同。
Monaco 9pt 修复了尖括号,比 xterm 字体更垂直紧凑(水平相同)。大写 I 非常糟糕(很难与 l 和 i 和 | 区分开来)。
来自Proggy Fonts 的 ProggyTiny11pt。将行间距设置为 0.9 使其在垂直方向上比 X11 的 xterm 字体更紧凑。无论哪种方式,它在水平方向上都占用了同样多的空间。不管有没有行空间挤压,我发现这个选项绝对比摩纳哥更糟糕。其他 Proggy 变体似乎不像 xterm 字体那么紧凑。
Anonymousat 10pt with 0.95 个字符间距(我仍然不知道如何在除 Terminal.app 之外的任何东西中压缩字符或行间距)并且正常的行间距与 X11 字体的大小完全相同。压扁字符间距会导致大写字符彼此非常轻微地接触,这样数字就相当难看。通过垂直(行)空间压缩,它可以在不损害可读性的情况下比 xterm 字体在垂直方向上更加紧凑。(匿名在 9pt 非常非常紧凑并且仍然非常可读。)我真的不喜欢这种字体中的插入符号(“^”),无论有没有压扁。
FixedMedium6x13设置为大小 13 和行距 0.80正好生成 xterm 字体。我的朋友David Yang报告说,这对他在 Snow Leopard 上完美无缺。我在 Leopard 上,它对我不可用(压扁的行距使其像 X11 一样紧凑)因为存在某种刷新问题——它会切断字母的顶部,直到终端窗口重新呈现,就像当你 alt-tab 远离它。
Others I intend to try:
我打算尝试的其他人:
- Envy Code R: http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released
- Inconsolata: http://www.levien.com/type/myfonts/inconsolata.html
- Droid Sans Mono: http://en.wikipedia.org/wiki/Droid_(font)
- 羡慕代码 R:http: //damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released
- Inconsolata:http: //www.levien.com/type/myfonts/inconsolata.html
- Droid Sans Mono:http: //en.wikipedia.org/wiki/Droid_(font )
回答by neu242
Just use one of these:
只需使用其中之一:
- http://henrik.synth.no/fonts/6x12.dfont
- http://henrik.synth.no/fonts/6x13.dfont
- http://henrik.synth.no/fonts/7x13.dfont
- http://henrik.synth.no/fonts/7x14.dfont
- http://henrik.synth.no/fonts/6x12.dfont
- http://henrik.synth.no/fonts/6x13.dfont
- http://henrik.synth.no/fonts/7x13.dfont
- http://henrik.synth.no/fonts/7x14.dfont
You might want to adjust the line height to 0.85 when you select the font.
选择字体时,您可能希望将行高调整为 0.85。
(Thanks to Marty Vonafor the guide)
(感谢Marty Vona的指导)
回答by z8000
The font used in xterms is extremely compact yet readable. What font is that?
xterms 中使用的字体非常紧凑但可读。那是什么字体?
The font you are referring to is known as "fixed" or "6x13".
您所指的字体称为“固定”或“6x13”。
I started (but gave up) a "6x13 redux"which was meant to be one of those TrueType fonts that only looks good at one size but was usable in Terminal.app. I gave up because creating a font with UNICODE glyphs is a HUGE undertaking. Just look at this glyph table for 6x13. BTW, that "6x13 Redux" font I created only seems to work in Terminal.app on Tiger, not on Leopard.
我开始(但放弃了)一个“6x13 redux”,它是那些只在一种尺寸下看起来不错但在 Terminal.app 中可用的 TrueType 字体之一。我放弃了,因为用 UNICODE 字形创建字体是一项艰巨的任务。 看看这个 6x13 的字形表。顺便说一句,我创建的“6x13 Redux”字体似乎只适用于 Tiger 的 Terminal.app,而不适用于 Leopard。
The closest I've come to 6x13 is ProggySquare at 11pt.
我最接近 6x13 的是 ProggySquare 11pt。
回答by xer0x
My favorite pixel font is 'Dinattf 10px' at 16pt on a dark background. It makes a great font for coding, since it has slashed zeros, and distinct characters.
我最喜欢的像素字体是 ' Dinattf 10px' 16pt 深色背景。它是一种很棒的编码字体,因为它有斜线零和不同的字符。
You can find the Mac TrueType version at http://www.geenat.com/?p=66and the original bitmap version at http://www.donationcoder.com/Software/Jibz/Dina/index.html
你可以找到在Mac的TrueType版本http://www.geenat.com/?p=66和原始位版本的http://www.donationcoder.com/Software/Jibz/Dina/index.html
The Proggy font that Dina is based on is also really sharp at a small text size. Unfortunately, it is a little too small for me.
Dina 基于的 Proggy 字体在小文本时也非常清晰。不幸的是,它对我来说有点太小了。
Additionally, you can use SIMBL plugins to tweak Terminal.app to better suit you. In addition to the color preferences, I find all the plugins below really helpful when using Terminal.
此外,您可以使用 SIMBL 插件来调整 Terminal.app 以使其更适合您。除了颜色偏好之外,我发现以下所有插件在使用终端时都非常有用。
For a start the default colours in Terminal.app are difficult to see. To fix this, you can install Ciaran Walsh's custom color plugin.
首先,很难看到 Terminal.app 中的默认颜色。要解决此问题,您可以安装Ciaran Walsh 的自定义颜色插件。
- SIMBL - http://www.culater.net/software/SIMBL/SIMBL.php
- Custom colors - http://ciaranwal.sh/2007/11/01/customising-colours-in-leopard-terminal
- Tab Switching (if you prefer CMD-1 instead of CMD-SHIFT-{}/arrow keys) - http://ciaranwal.sh/2007/12/10/tab-switching-in-terminal
- Visor - http://visor.binaryage.com/
- MegaZoomer for Fullscreen - http://ianhenderson.org/megazoomer.html
- The IR_Black color scheme - http://blog.infinitered.com/entries/show/6
- SIMBL - http://www.culer.net/software/SIMBL/SIMBL.php
- 自定义颜色 - http://ciaranwal.sh/2007/11/01/customising-colours-in-leopard-terminal
- 选项卡切换(如果您更喜欢 CMD-1 而不是 CMD-SHIFT-{}/箭头键) - http://ciaranwal.sh/2007/12/10/tab-switching-in-terminal
- 遮阳板 - http://visor.binaryage.com/
- MegaZoomer 全屏 - http://ianhenderson.org/megazoomer.html
- IR_Black 配色方案 - http://blog.infinitered.com/entries/show/6
回答by BadmintonCat
I've created the DinaPro font which is like the original Dina, but for Mac ... http://www.hexagonstar.com/blog/news/dinapro-coding-font-for-mac-released/
我已经创建了 DinaPro 字体,它类似于原始的 Dina,但对于 Mac ... http://www.hexagonstar.com/blog/news/dinapro-coding-font-for-mac-released/
回答by Keltia
I've been using Bitstream Vera Mono later DeJaVu Sans Mono (for more unicode characters) for quite a long time but I've switched a few months ago to the font used by Android, Google's OS for mobile phones, called Droid Sans Mono. It is really more readable for me. For Terminal.app, I do shrink it a bit horizontally though.
我一直在使用 Bitstream Vera Mono 后来 DeJaVu Sans Mono(用于更多 unicode 字符)很长一段时间,但几个月前我已经切换到 Android 使用的字体,谷歌的手机操作系统,称为Droid Sans Mono。它对我来说确实更具可读性。对于 Terminal.app,我确实将其水平缩小了一点。
回答by Arthur Reutenauer
X11 default fonts are usually bitmap fonts, which aren't of any use to non-X applications ... on my Mac box, the default font for X11 apps seems to be -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1
, corresponding to the file /usr/X11/lib/X11/fonts/misc/7x14-ISO8859-1.pcf.gz
X11 默认字体通常是位图字体,对非 X 应用程序没有任何用处……在我的 Mac 盒子上,X11 应用程序的默认字体似乎是-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1
,对应于文件/usr/X11/lib/X11/fonts/misc/7x14-ISO8859-1.pcf.gz
You can display the character table with the command /usr/X11R6/bin/xfd -fn -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1
and check if it's the one you see in your xterms. If so, I'm afraid there's nothing to do: PCF fonts are (very) low resolution bitmap fonts, and that's why they look so good on screen, by the way (they just fit with your particular screen resolution); but they're no way other Mac OS X applications are going to use them.
您可以使用命令显示字符表/usr/X11R6/bin/xfd -fn -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1
并检查它是否是您在 xterms 中看到的字符表。如果是这样,恐怕没有什么可做的:PCF 字体是(非常)低分辨率的位图字体,顺便说一下,这就是它们在屏幕上看起来如此出色的原因(它们只适合您的特定屏幕分辨率);但是其他 Mac OS X 应用程序不会使用它们。