简体   繁体   English

UTF-8字符在Vim中被截断

[英]UTF-8 Characters are Truncated in Vim

When I have some UTF-8 characters in my document, they are sometimes truncated. 当我的文档中包含一些UTF-8字符时,它们有时会被截断。 This appears to be an issue specific to certan fonts. 这似乎是特定于certan字体的问题。 When I am Courier 10 Pitch the issue exists: 当我使用Courier 10 Pitch ,存在以下问题:

在此处输入图片说明

(Note the first ☻ is truncated.) (请注意,第一个☻被截断了。)

But if I switch to Nimbus Mono L the issue no long exists: 但是,如果我切换到Nimbus Mono L该问题将Nimbus Mono L

在此处输入图片说明

Is there a way that I can get Courier 10 Pitch to render properly? 有没有办法让Courier 10 Pitch正确渲染? It is my preferred font. 这是我的首选字体。

Vim Version Info: 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

I have seen this problem elsewhere, like in viewing and printing PDFs when using Courier "10 pitch" specifically in my word processor. 我在其他地方也看到过这个问题,例如在我的文字处理器中使用Courier“ 10 pitch”时查看和打印PDF时。

Try switching to just "Courier", and if that does not work, try downloading a Courier True Type Font from wherever on the Internet, and using that. 尝试切换到仅“ Courier”,如果不起作用,请尝试从Internet上的任何位置下载Courier True Type字体,然后使用该字体。 You should be able to find a variation that matches your preference. 您应该能够找到符合您的偏好的变体。

I know you would think that any "Courier" font should work since it goes back to the days of the IBM Selectric, but I had a similar problem, and fixed it just by switching to regular "Courier", without the "10 Pitch" 我知道您会认为任何“ Courier”字体都可以使用,因为它可以追溯到IBM Selectric的时代,但是我也遇到了类似的问题,仅通过切换到常规的“ Courier”而不使用“ 10 Pitch”就可以解决此问题。

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

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