如何获得GNU Unifont或Free Mono在gvim windows上的工作? [英] How do I get GNU Unifont or Free Mono working on gvim windows?

查看:182
本文介绍了如何获得GNU Unifont或Free Mono在gvim windows上的工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Windows 7的gvim中获得对符文字符的支持。我在字体目录中安装了Free Mono和GNU Unifont(它们都支持这个范围)字体,但是它们没有出现在字体菜单中,和gvim给我一个无效的字体消息为以下几行:

  set guifont = unifont:h12:cANSI 
set guifont = GNU_Unifont:h12:cANSI
set guifont = Free_Mono:h12:cANSI
set guifont = Free_Monospaced:h12:cANSI
set guifont = FreeMono:h12:cANSI

等等...

我如何得到这个工作?我注意到字体都是字体家族的一部分,中,而工作的Ubuntu Mono被标记为Regular。这有什么区别吗?我一般都没有在gvim上更改字体,甚至是等宽字体。

解决方案

你让我好奇这是为什么没有工作,所以我安装了 fontforge 来探听字体。事实证明,你是正确的关于字体本身的问题: PANOSE比例代码是均匀宽度(4),而不是等宽(9)。由于vim过滤掉了非等宽字体,这就解释了为什么它们不会显示在对话框中。



如果你感兴趣,我得到了Windows fontforge 通过独立的cygwin / X build由这个日本人,通过此页面进行英文讨论。安装完成后,打开字体,在Element-> Font Info-> OS / 2-> Panose中查看。

我尝试更改设置并保存文件,但1)保存的字体文件是原来的10倍,它花了几分钟的时间来保存文件,所以有可能出错,然后2)Windows拒绝加载它,抱怨它不是一个有效的字体文件。我已经达到了我的好奇心,但也许你可以做到这一点。


I am trying to get support for runic characters in gvim on Windows 7. I have the fonts Free Mono and GNU Unifont (which both support this range) installed in my Fonts directory, but they do not appear in the font menu, and gvim gives me an invalid font message for the following lines:

set guifont=unifont:h12:cANSI
set guifont=GNU_Unifont:h12:cANSI
set guifont=Free_Mono:h12:cANSI
set guifont=Free_Monospaced:h12:cANSI
set guifont=FreeMono:h12:cANSI

etc...

How do I get this to work? I noticed the fonts both are part of font family, "Medium", while Ubuntu Mono, which works, is tagged as "Regular". Does this make any difference? I have not had much luck in general with changing fonts on gvim, even monospace fonts.

解决方案

You made me curious about why this wasn't working, so I installed fontforge to snoop around inside the font. It turns out you were right about the font itself having the issue: The PANOSE proportion code is "Even Width" (4), not "Monospaced" (9). Since vim filters out non-monospaced fonts, this explains why they don't show up in the dialog.

In case you're interested, I got Windows fontforge via a standalone cygwin/X build prepared by this Japanese fellow, via this page with a discussion in English. Once you have it installed, open the font and look in Element->Font Info->OS/2->Panose.

I tried changing the setting and saving the file, but 1) the saved font file was 10 times larger than the original and it took a couple minutes to save the file, so something probably went wrong, and then 2) Windows refused to load it, complaining it isn't a valid font file. I've reached the end of my curiosity, but maybe you can make it work.

这篇关于如何获得GNU Unifont或Free Mono在gvim windows上的工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆