Loading ...
Sorry, an error occurred while loading the content.

2393Re: cjk char width is a little wider

Expand Messages
  • Kornelis
    Oct 16, 2007
      On Oct 16, 9:26 am, Tony Mechelynck <antoine.mechely...@...>
      > > > On Oct 15, 8:41 pm, Kenneth Beesley
      > > > <krbees...@...> wrote: When you set both
      > > > guifont and guifontwide, when does vim use one, and
      > > > when the other? [snip]
      > > It uses the guifont for the characters that are not
      > > wide and the guifontwide for those that are. Actually
      > > quite convinient, since you can select your best
      > > latin font and best Asian font at the same time. But
      > > you can also choose the same font for both (but not
      > > always - depends on the font).
      > >
      > > If you set only guifont on Linux Pango/Xft will
      > > choose a wide font to match, but for reasons unknown
      > > to me some combinations mess up the character spacing
      > > of the Asian font in gvim upto now. Therefore
      > > explicitly setting guifontwide as well works better
      > > for me.
      > >
      > > Best results are to be expected with a monospaced
      > > font for the latin font.

      > The wide glyphs should be exactly twice the width of,
      > and the same height as, the narrow glyphs, regardless
      > of whether or not you use the 'guifontwide' option.

      I thought the orignal poster was talking about TTF, but I
      don't know how to determine the width of a TTF (I
      remember I tried to find that out through fontconfig, but
      according to my notes all I got was a width of 100 for
      *all* my TTF fonts).

      As for the height (still talking TTF) do you mean size? I
      play with setting that to make a better match, but I never
      noticed a problem.

      But perhaps your comment was strictly with regard to
      bitmap, unscalable fonts?

      I know how to get info on the height and width of bitmap
      fonts, and in fact I use bitmap fonts in gvim as a rule.
      But in my experience thus far lots of users want to use
      TTF. Perhaps I don't know how to get info on those
      correctly, or perhaps things are different in different
      distro's and/or wm's? (Slackware 10.2 / Openbox here)

      > Not setting 'guifontwide' (and selecting some
      > East-Asian 'guifont' when editing a file containing CJK
      > text) works best for me on gvim with GTK2 GUI. That
      > way, proper size relations between wide and narrow
      > glyphs are ensured by the construction of the font
      > itself.

      When I set only guifont with a TTF, the results are
      unpredictable in my version of gvim (version 7.0 on
      Slackware 10.2). Some fonts are spaced correctly (e.g.
      Kochi Mincho or HGSeikaishotaiPRO) others are not. For
      example the popular free TTF Bitstream Cyberbit spaces
      too wide when I set only guifont. Some epson fonts I've
      got display wrong as guifont as well. But when I set them
      as guifontwide in combination with a latin monospace TTF
      for guifont things are just fine.

      I've seen this for many years, and I thought the original poster
      was having the same problem. But perhaps my system is
      broken and is my approach a crude end-user hack.

      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 10 messages in this topic