适用于 mac osx 的字体与默认 xterm (X11) 字体一样可读且紧凑

发布于 2024-07-10 18:26:03 字数 378 浏览 10 评论 0 原文

xterms 中使用的字体非常紧凑但可读。 那是什么字体? 我发现可以在其他应用程序中使用的最接近的是 DejaVu Sans Mono 或 Bitstream Vera Sans Mono。 它们在垂直方向上与 xterms 一样紧凑,但在水平方向上占用更多空间。

我真的很想从 xterms 切换到 Terminal.app,这是阻碍我的一件事。

(我还认为该字体对于 emacs、xcode 或任何编辑器来说会更好。)

添加:在 Terminal.app 中,您可以调整任何字体的字符和行间距。 这在其他应用程序中可能吗?

我对任何其他像 xterm 字体一样紧凑且可读的字体持开放态度。 Dina 看起来确实不错,但似乎不适用于 Mac。

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.

I'd really like to switch from xterms to Terminal.app and this is the one thing holding me back.

(I also think that font would be much better for emacs, xcode, or whatever editor.)

ADDED: In Terminal.app you can adjust the character and line spacing for any font. Is this possible in other applications?

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

荒芜了季节 2024-07-17 18:26:03

我已经成功让 Emacs.App 使用心爱的杂项固定 7x14 字体。 它看起来不错。

1) 从 http://www 下载 ucs-fonts.tar.gz .cl.cam.ac.uk/~mgk25/ucs-fonts.html

2) 解压文件 7x14.bdf

3) 安装 FontForge (fontforge.sourceforge.net)

4) 在 fontforge 中打开 7x14.bdf

5)在fontforge中做文件->生成带有“无轮廓字体”和“仅Apple位图sfont(dfont)”的字体

6)保存为/Library/Fonts/FixedMedium7x14.dfont

7)在您的.emacs中(setq默认字体“- apple-Fixed-medium-normal-normal--14----m-0-iso10646-1")

8) WIN

I have successfully gotten Emacs.App to use the beloved misc-fixed 7x14 font. And it looks GOOD.

1) download ucs-fonts.tar.gz from http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html

2) extract the file 7x14.bdf

3) install FontForge (fontforge.sourceforge.net)

4) open 7x14.bdf in fontforge

5) in fontforge do File->Generate Fonts with "No Outline Font" and "Apple bitmap only sfont (dfont)"

6) save as /Library/Fonts/FixedMedium7x14.dfont

7) in your .emacs (setq default-font "-apple-Fixed-medium-normal-normal--14----m-0-iso10646-1")

8) WIN

梦中楼上月下 2024-07-17 18:26:03

我真的很喜欢 Inconsolata:
http://www.levien.com/type/myfonts/inconsolata.html
但它并不真正适合 xterm。 作为编程字体更好。

我强烈建议摩纳哥 9pt,而不是抗锯齿:

monaco9.png

从未见过如此可读且节省空间的东西。 请注意,它的像素宽度与 Monaco 10 相同,但稍短。

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.

I'd strongly suggest Monaco 9pt, not anti-aliased:

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.

淡墨 2024-07-17 18:26:03

虽然不完全一样,但 10 点 Monaco(关闭抗锯齿)非常接近。 我想说它实际上更好一点,因为 Monaco 的 1/l 和 O/0 字形比 X 字体更清晰。

It's not exactly the 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.

櫻之舞 2024-07-17 18:26:03

这是我尝试过的替代方案。 (感谢 Will 和其他人。)

  1. Monaco 10pt,行距为 0.9(我不知道如何在 Terminal.app 之外的任何其他内容中压缩行或字符间距)所占用的垂直和水平空间与xterm 字体。 如果没有挤压行空间,它会占用更多的垂直空间。 我不认为挤压会损害可读性。 Monaco 具有斜线零的优点,但尖括号更糟糕(它们笨拙地撞到相邻字符,例如“~>”)。 大写字符(特别是“A”)在摩纳哥看起来也不太好。 但大多数情况下,它们是相同的。

  2. Monaco 9pt 修复了尖括号,并且在垂直方向上比 xterm 字体更紧凑(水平方向相同)。 大写 I 相当糟糕(很难与 l、i 和 | 区分开)。

  3. ProggyTiny 来自 Proggy 字体,11pt。 将行间距设置为 0.9 使其在垂直方向上比 X11 的 xterm 字体稍微紧凑一些。 不管怎样,它在水平方向上占用的空间完全相同。 不管有没有行空间压缩,我发现这个选项肯定比摩纳哥更糟糕。 其他 Proggy 变体似乎不像 xterm 字体那么紧凑。

  4. 匿名 10pt,0.95 字符间距(我仍然不这样做)我不知道如何压缩除 Terminal.app 之外的任何内容中的字符或行距),并且正常行距与 X11 字体的大小完全相同。 挤压字符间距会导致大写字符彼此轻微接触,这样数字就很难看。 通过垂直(行)空间压缩,它可以比 xterm 字体在垂直方向上更紧凑,而不会损害可读性。
    (9pt 的 Anonymous 非常非常紧凑,而且仍然非常可读。)我真的不喜欢这种字体中的插入符号(“^”),无论有没有挤压。

  5. FixedMedium6x13 设置为大小 13 且行距 0.80 会生成 xterm 字体 。 我的朋友 David Yang 报告说,这对他在 Snow Leopard 上的工作非常完美。 我使用的是 Leopard,它对我来说无法使用(行距被压扁,使其像 X11 一样紧凑),因为存在某种刷新问题——它会切断字母的顶部,直到终端窗口重新渲染,就像当

我打算尝试的其他内容:

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. 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.

  2. 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 |).

  3. ProggyTiny from Proggy Fonts at 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.

  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. 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.

  5. FixedMedium6x13 set to size 13 and line spacing 0.80 yields the xterm font exactly. My friend David Yang reports 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.

Others I intend to try:

凉城 2024-07-17 18:26:03

只需使用其中之一:

您可能需要调整选择字体时将行高更改为 0.85。

(感谢 Marty Vona 获取指南)

Just use one of these:

You might want to adjust the line height to 0.85 when you select the font.

(Thanks to Marty Vona for the guide)

≈。彩虹 2024-07-17 18:26:03

xterms使用的字体非常
紧凑但可读。 是什么字体
那?

您所指的字体称为“固定”或“6x13”。

我开始(但放弃了)一个 "6x13 redux" ,这本来是一个这些 TrueType 字体仅在一种尺寸下看起来不错,但可在 Terminal.app 中使用。 我放弃了,因为用 UNICODE 字形创建字体是一项艰巨的任务。 看看这个 6x13 的字形表。 顺便说一句,我创建的“6x13 Redux”字体似乎只适用于 Tiger 上的 Terminal.app,而不适用于 Leopard。

我最接近 6x13 的是 ProggySquare,位于 11pt。

The font used in xterms is extremely
compact yet readable. What font is
that?

The font you are referring to is known as "fixed" or "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.

The closest I've come to 6x13 is ProggySquare at 11pt.

郁金香雨 2024-07-17 18:26:03

我最喜欢的像素字体是深色背景上 16pt 的“Dina ttf 10px”。 它是一种非常适合编码的字体,因为它有斜线零和不同的字符。

您可以在 http://www.geenat.com/?p=66< 找到 Mac TrueType 版本/a>
原始位图版本位于
http://www.donationcoder.com/Software/ Jibz/Dina/index.html

Dina 所基于的 Proggy 字体在小文本尺寸下也非常清晰。 不幸的是,它对我来说有点太小了。


此外,您可以使用 SIMBL 插件来调整 Terminal.app 以更好地适合您。 除了颜色首选项之外,我发现下面的所有插件在使用终端时都非常有用。

首先,Terminal.app 中的默认颜色很难看到。 要解决此问题,您可以安装Ciaran Walsh 的自定义颜色插件

My favorite pixel font is 'Dina ttf 10px' at 16pt on a dark background. 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

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.


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.

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.

情未る 2024-07-17 18:26:03

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

您可以使用命令 /usr/X11R6/bin/xfd -fn -misc-fixed-medium-r-normal--14-130-75-75-c-70 显示字符表-iso8859-1 并检查它是否是您在 xterms 中看到的那个。 如果是这样,恐怕没有什么可做的:PCF 字体是(非常)低分辨率的位图字体,这就是为什么它们在屏幕上看起来这么好,顺便说一句(它们只是适合您特定的屏幕分辨率); 但其他 Mac OS X 应用程序绝不会使用它们。

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

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.

自由如风 2024-07-17 18:26:03

我已经使用 Bitstream Vera Mono 后来的 DeJaVu Sans Mono(用于更多 unicode 字符)很长一段时间了,但几个月前我已经切换到 Android(Google 的手机操作系统)使用的字体,称为 Droid Sans Mono。 这对我来说确实更具可读性。 对于 Terminal.app,我确实水平缩小了一点。

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.

掐死时间 2024-07-17 18:26:03

我创建了 DinaPro 字体,它类似于原始的 Dina,但适用于 Mac ... http://www.hexagonstar.com/blog/news/dinapro-coding-font-for-mac-released/

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/

梦明 2024-07-17 18:26:03

尝试不使用抗锯齿功能的 andale mono...在我的 mac pro 15in 上看起来不错

Try andale mono without anti-aliasing... it looks good on my mac pro 15in

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文