简体   繁体   English

mac osx的字体,与默认的xterm(X11)字体一样可读和紧凑

[英]Font for mac osx that is as readable and compact as the default xterm (X11) font

The font used in xterms is extremely compact yet readable. xterms中使用的字体非常紧凑但可读。 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. 我发现我可以在其他应用程序中使用的最接近的是DejaVu Sans Mono或Bitstream Vera Sans Mono。 Those are as compact as xterms vertically but take up more space horizontally. 它们与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. 增加:在Terminal.app中,您可以调整任何字体的字符和行间距。 Is this possible in other applications? 这在其他应用程序中是否可行?

I'm open to any other font that is as compact and readable as the xterm font. 我对任何其他与xterm字体一样紧凑和可读的字体都是开放的。 Dina looks really nice but it doesn't seem to work for Mac. 迪娜看起来很不错,但它似乎不适用于Mac。

I have successfully gotten Emacs.App to use the beloved misc-fixed 7x14 font. 我已经成功地让Emacs.App使用了心爱的misc-fixed 7x14字体。 And it looks GOOD. 它看起来很棒。

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 do 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)赢

I've really taken a liking to Inconsolata: 我真的很喜欢Inconsolata:
http://www.levien.com/type/myfonts/inconsolata.html http://www.levien.com/type/myfonts/inconsolata.html
But it's not really appropriate for an xterm. 但它并不适合xterm。 Better as a programming font. 更好的编程字体。

I'd strongly suggest Monaco 9pt, not anti-aliased: 我强烈建议摩纳哥9pt,而不是抗锯齿:

monaco9.png

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的像素宽度相同,但略短。

It's not exactly the same, but 10 point Monaco (with anti-aliasing turned off) is pretty darn close. 它不完全相同 ,但10点摩纳哥(关闭抗锯齿)非常接近。 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. 我说它实际上好一点,因为摩纳哥的1 / l和O / 0字形比X字体更明显。

Just use one of these: 只需使用以下其中一个:

You might want to adjust the line height to 0.85 when you select the font. 选择字体时,可能需要将线高调整为0.85。

(Thanks to Marty Vona for the guide) (感谢Marty Vona的指导)

Here are alternatives I've tried. 这是我尝试过的替代方案。 (Thanks to Will and others.) (感谢威尔和其他人。)

  1. 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. 具有.9行间距的摩纳哥10pt(我不知道如何在除Terminal.app之外的任何东西中挤压行或字符间距)占用与xterm字体完全相同的垂直和水平空间。 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. 大写字母(特别是“A”)在摩纳哥也不太好看。 Mostly though, they are about the same. 但大多数情况下,它们大致相同。

  2. Monaco 9pt fixes the angle brackets and is more vertically compact than the xterm font (same horizontally). 摩纳哥9pt修复了尖括号,并且比xterm字体(水平相同)更紧凑。 Capital I is pretty sucky (hard to distinguish from l and i and |). 资本I非常糟糕(很难区分l和i和|)。

  3. ProggyTiny from Proggy Fonts at 11pt. 来自Proggy Fonts的 ProggyTiny于11月1日举行。 Setting the line spacing to .9 makes it vertically slightly more compact than X11's xterm font. 将行间距设置为.9使其垂直地比X11的xterm字体更紧凑。 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. 其他Proggy品种似乎不像xterm字体那样紧凑。

  4. Anonymous at 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. 匿名在10pt与.95字符间距(我仍然不知道如何挤压除了Terminal.app之外的任何东西中的字符或行间距)和法线间距与X11字体的大小完全相同。 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. 对于垂直(线)空间压扁,它可以比xterm字体更紧凑,而不会损害可读性。 (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. (9pt的匿名是非常非常紧凑,仍然非常可读。)我真的不喜欢这种字体中的插入符号(“^”),有或没有压扁。

  5. FixedMedium6x13 set to size 13 and line spacing 0.80 yields the xterm font exactly . FixedMedium6x13设置为13,行间距为0.80, 准确生成xterm字体。 My friend David Yang reports that this works flawlessly for him on Snow Leopard. 我的朋友David Yang报告说,这对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. 我在Leopard上并且它对我来说无法使用(压扁行间距使得它像X11一样紧凑),因为存在某种刷新问题 - 它会切断字母的顶部,直到终端窗口重新渲染,就像你远离它的alt-tab。

Others I intend to try: 其他我打算尝试:

The font used in xterms is extremely compact yet readable. xterms中使用的字体非常紧凑但可读。 What font is that? 那是什么字体?

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. 我开始(但放弃了) “6x13 redux” ,这是一种TrueType字体,只有一种尺寸看起来不错,但可以在Terminal.app中使用。 I gave up because creating a font with UNICODE glyphs is a HUGE undertaking. 我放弃了因为使用UNICODE字形创建字体是一项巨大的任务。 Just look at this glyph table for 6x13 . 只需看看这个6x13的字形表 BTW, that "6x13 Redux" font I created only seems to work in Terminal.app on Tiger, not on Leopard. 顺便说一下,我创建的“6x13 Redux”字体似乎只适用于Tiger上的Terminal.app,而不适用于Leopard。

The closest I've come to 6x13 is ProggySquare at 11pt. 我最接近6x13的是ProggySquare,11pt。

My favorite pixel font is ' Dina ttf 10px' at 16pt on a dark background. 我最喜欢的像素字体是' Dina ttf 10px',在16pt深色背景上。 It makes a great font for coding, since it has slashed zeros, and distinct characters. 它是一个很好的编码字体,因为它削减了零和不同的字符。

You can find the Mac TrueType version at http://www.geenat.com/?p=66 and the original bitmap version at http://www.donationcoder.com/Software/Jibz/Dina/index.html 您可以在http://www.geenat.com/?p=66找到Mac TrueType版本,在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. Dina所基于的Proggy字体在文本较小时也非常清晰。 Unfortunately, it is a little too small for me. 不幸的是,它对我来说有点小。


Additionally, you can use SIMBL plugins to tweak Terminal.app to better suit you. 此外,您可以使用SIMBL插件调整Terminal.app以更好地适合您。 In addition to the color preferences, I find all the plugins below really helpful when using Terminal. 除了颜色首选项,我发现下面的所有插件在使用终端时非常有用。

For a start the default colours in Terminal.app are difficult to see. 首先,很难看到Terminal.app中的默认颜色。 To fix this, you can install Ciaran Walsh's custom color plugin . 要解决此问题,您可以安装Ciaran Walsh的自定义颜色插件

我已经创建了DinaPro字体,就像原来的Dina一样,但对于Mac ... http://www.hexagonstar.com/blog/news/dinapro-coding-font-for-mac-released/

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. 您可以使用命令/usr/X11R6/bin/xfd -fn -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1显示字符表,并检查它是否是你在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); 如果是这样,我恐怕无所事事:PCF字体是(非常)低分辨率的位图字体,这就是为什么它们在屏幕上看起来如此优秀,顺便说一句(它们只适合你的特定屏幕分辨率); but they're no way other Mac OS X applications are going to use them. 但是他们不会像其他Mac OS X应用程序那样使用它们。

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 . 我已经使用Bitstream Vera Mono后来DeJaVu Sans Mono(对于更多unicode角色)已经很长一段时间了,但几个月前我已经转换为Android的谷歌手机操作系统Droid Sans Mono使用的字体。 It is really more readable for me. 它对我来说真的更具可读性。 For Terminal.app, I do shrink it a bit horizontally though. 对于Terminal.app,我确实将它缩小了一点。

尝试没有抗锯齿的andale mono ...它在我的mac pro 15in上看起来不错

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM