UTF-8字符在Vim中被截断

时间:2016-03-30 15:32:13

标签: vim utf-8

当我的文档中有一些UTF-8字符时,它们有时会被截断。这似乎是certan字体特有的问题。当我Courier 10 Pitch时,问题就出现了:

enter image description here

(注意第一个☻被截断。)

但是,如果我切换到Nimbus Mono L,问题不再存在:

enter image description here

有没有办法让Courier 10 Pitch正确呈现?这是我的首选字体。

Vim版本信息:

:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 24 2014 15:40:38)
Included patches: 1-560
Compiled by JAKE
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl             +cscope          +folding         +menu            +netbeans_intg   -sniff           +virtualedit
+arabic          +cursorbind      -footer          +mksession       +path_extra      +startuptime     +visual
+autocmd         +cursorshape     +fork()          +modify_fname    -perl            +statusline      +visualextra
+balloon_eval    +dialog_con_gui  +gettext         +mouse           +persistent_undo -sun_workshop    +viminfo
+browse          +diff            -hangul_input    +mouseshape      +postscript      +syntax          +vreplace
++builtin_terms  +digraphs        +iconv           +mouse_dec       +printer         +tag_binary      +wildignore
+byte_offset     +dnd             +insert_expand   -mouse_gpm       +profile         +tag_old_static  +wildmenu
+cindent         -ebcdic          +jumplist        -mouse_jsbterm   -python          -tag_any_white   +windows
+clientserver    +emacs_tags      +keymap          +mouse_netterm   -python3         -tcl             +writebackup
+clipboard       +eval            +langmap         +mouse_sgr       +quickfix        +terminfo        +X11
+cmdline_compl   +ex_extra        +libcall         -mouse_sysmouse  +reltime         +termresponse    -xfontset
+cmdline_hist    +extra_search    +linebreak       +mouse_urxvt     +rightleft       +textobjects     +xim
+cmdline_info    +farsi           +lispindent      +mouse_xterm     -ruby            +title           +xsmp_interact
+comments        +file_in_path    +listcmds        +multi_byte      +scrollbind      +toolbar         +xterm_clipboard
+conceal         +find_in_path    +localmap        +multi_lang      +signs           +user_commands   -xterm_save
+cryptv          +float           -lua             -mzscheme        +smartindent     +vertsplit       -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr
/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/g
lib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SO
URCE=1
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim   -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -l
pangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2
.0   -lSM -lICE -lXt -lX11 -lSM -lICE  -lm -ltinfo -lelf -lnsl  -lselinux -lacl -lattr

1 个答案:

答案 0 :(得分:0)

我在其他地方看到过这个问题,比如在我的文字处理器中使用Courier“10 pitch”时查看和打印PDF文件。

尝试切换到“Courier”,如果不起作用,请尝试从Internet上的任何地方下载Courier True Type字体,然后使用它。您应该能够找到符合您偏好的变体。

我知道你会认为任何“Courier”字体应该可以工作,因为它可以追溯到IBM Selectric的时代,但是我遇到了类似的问题,并且只是通过切换到常规的“Courier”来修复它,而没有“ 10间距“