[patch][win32] Fix multibyte fontname

35 views
Skip to first unread message

Ken Takata

unread,
Aug 9, 2017, 12:18:22 PM8/9/17
to vim_dev
Hi,

On Win32, "_" can be used instead of a white space for 'guifont' for convenience.
For example, when a user sets "guifont=MS_Gothic", vim will also search a font
named "MS Gothic".
However, I found that this doesn't work well when a font name contains a
character which includes "_" as a part of it. E.g. The second byte of "柔" is
the same as "_" in the cp932 encoding. So ":set gfn=源柔ゴシック等幅_Regular"
doesn't work as expected. (":set gfn=源柔ゴシック等幅\ Regular" works.)

Attached patch fixes the problem.

Regards,
Ken Takata
fix-win32-guifontname.patch

Bram Moolenaar

unread,
Aug 9, 2017, 4:57:21 PM8/9/17
to vim...@googlegroups.com, Ken Takata
Thanks!

--
Q: What kind of stuff do you do?
A: I collect hobbies.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages