是什么使字体在gVim中无效? [英] What makes a font invalid for use in gVim?

查看:443
本文介绍了是什么使字体在gVim中无效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7上使用gVim,最近我在C:\ Windows \ Fonts中添加了一些字体。在gVim中,我可以:set guifont = Font_Name 其中的一些,并且按照预期设置,但是对于其他几个我得到 E596无效的字体):Font_Name



很明显,不能剪切的字体要么具有或缺乏gVim要求加载的字体的某些属性。有谁知道这些是什么,如果有的话,可以做些什么来修改现有的字体,以便它符合这些标准?



特别是,以下字体失败:





我不会惊讶地发现这些字体不完整或缺少Vim所要求的东西。我只是不知道要检查什么。

解决方案

您是否读过:h guifont
我已经在另外一个非常类似的问题中做了一些猜测,但是我找不到ATM。简而言之,Windows上的GVim对其字体非常挑剔:它想要一个等宽字体,但是你尝试过的字体中的某些东西并不符合它的喜好。在这种情况下,Cronos Display显然不是等宽的,所以它不可能工作。我不知道等宽,但我很惊讶解放单声道不起作用。

您可以在字体编辑器中打开字体以查看if他们真的是等宽。


I'm using gVim on Windows 7 and I recently added some fonts to C:\Windows\Fonts. In gVim, I can :set guifont=Font_Name some of them and it gets set as expected, but for several others I get E596 Invalid font(s): Font_Name.

Obviously the fonts which do not make the cut either have or lack some property which gVim requires of fonts it loads. Does anyone know what those are, and what, if anything, one might do to modify an existing font so that it meets those criteria?

In particular, the following fonts fail:

I will not be surprised to learn that these fonts are incomplete or missing something that Vim requires. I just have no idea what to check for.

解决方案

Did you read :h guifont?

I've already made wild guesses in another very similar question but I couldn't find it ATM. In short, GVim on Windows is very picky about its fonts: it wants a monospaced font but something in the fonts you have tried is not to its liking.

In this case, "Cronos Display" is obviously not monospaced so there's no way it could work. I don't know about "Monospace" but I'm surprised "Liberation Mono" doesn't work.

You could open the fonts in a font editor to seee if they are really monospaced.

这篇关于是什么使字体在gVim中无效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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