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

27031Re: win32 gvim: font width problem

Expand Messages
  • Glenn Maynard
    Jan 31, 2002
      On Thu, Jan 31, 2002 at 08:46:35PM +0100, Bram Moolenaar wrote:
      > > Well, it's one of the basic system fonts, and there aren't many options
      > > for Japanese text. This isn't a case where I can simply replace the font--if
      > > it's a font problem, it's a system one that's not going away, so it
      > > really needs a workaround.
      > What do you expect Vim to do? Give you a warning that this font is
      > faulty? Detect that a faulty font is used (how?) and switch to
      > displaying each character separately? This is especially tricky when
      > several versions of the same font exist (e.g., when it's fixed by a
      > service pack).

      I believe Putty displays each character separately. I don't know how much
      of a speed hit this is; Putty is extremely fast on all systems I've used it
      on, but I've never used it on a really old system.

      In theory, you could test it: look at each glyph and see if the glyph
      widths are really as they should be (either the font's width or a
      multiple of.) I havn't tried this.

      Here's a suggestion: if you know which characters are of the incorrect
      width, you can render all valid characters together, and just render
      those characters individually. ("abcdπefg"; render "abcd", "π", "efg".)

      If done right, this would also make it possible to have multiple fonts for
      different Unicode ranges in Windows, too, which would be extremely nice to
      have. (I think you rejected this earlier for the same reason: you don't
      want to render character-by-character. With the above optimization, it
      should have no affect for people that don't use it, and little for those
      who do.)

      > When I look at this on my FreeBSD system with a standard Unicode font I
      > see only single-width characters. Where do you see a problem?

      I'll take a few screenshots; it's difficult to explain. I've taken out
      everything but the pi symbol, so it's easier to tell what's happening.


      The pi character has an incorrect width. There's no clean way to get a
      proper looking pi symbol here (the font just doesn't have one), but
      currently it makes the file difficult to even edit.

      Glenn Maynard
    • Show all 12 messages in this topic