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

improved Vim.app in latest version

Expand Messages
  • Benji Fisher
    Vim Mac fans: There are some important changes in Vim.app in the last couple of beta releases, and I would like help testing them on various systems. I have
    Message 1 of 4 , Apr 30, 2006
      Vim Mac fans:

      There are some important changes in Vim.app in the last couple of
      beta releases, and I would like help testing them on various systems. I
      have already posted binaries of vim 7.0g (released a few hours ago) for
      OS X 10.3 and 10.4/PPC at

      http://macvim.org/OSX/index.php#Downloading

      and (with a little help from my friends) I hope to have versions for
      10.2 and 10.4/universal soon.

      1. In earlier versions, if you compile with "normal" features, there was
      a problem when copying to the system clipboard. (The binaries at
      macvim.org are all compiled with "huge" features, so they did not have
      this problem.) I believe this problem has been fixed. No need for "It
      Just Works" reports, but if anyone still sees a problem, I would like to
      know.

      2. Font rendering is still problematic, but you can recover the older
      method of font rendering with

      :set nomacatsui

      In my testing, if I set 'nomacatsui' and 'noantialias' then fonts look
      normal. Also, I only see problems with certain fonts, such as Monaco; I
      do not see any problems with 'guifont' set to "" or to "Andale\ Mono".
      Please let me know if

      (a) there are still problems when 'nomacatsui' and 'noantialias' are
      set;

      (b) if there are situations (certain fonts? CJK or other non-ASCII
      characters?) where 'macatsui' gives better results.

      3. It looks as though file association is working. I still have not
      heard that anyone wants additional icons provided in the default
      distribution. This may be our last chance for vim 7.0!

      --Benji Fisher
    • Jun T.
      ... With set nomacatsui , I notice no problem not only with noantialias but also with antialias even for Monaco font. With set macatsui , Monaco font
      Message 2 of 4 , May 1, 2006
        At 17:14 -0400 06.4.30, Benji Fisher wrote:
        >2. Font rendering is still problematic, but you can recover the older
        >method of font rendering with
        >
        >:set nomacatsui
        >
        >In my testing, if I set 'nomacatsui' and 'noantialias' then fonts look
        >normal. Also, I only see problems with certain fonts, such as Monaco;

        With 'set nomacatsui', I notice no problem not only with 'noantialias'
        but also with 'antialias' even for Monaco font.

        With 'set macatsui', Monaco font does have some problems
        (e.g., gfn=Monaco:h9).
        The following patch seems to solve (at least some of) the ATSUI
        rendering problems:

        ===========================================================================
        --- vim70f/src/gui_mac.c 2006-04-24 22:26:47.000000000 +0900
        +++ vim70f2/src/gui_mac.c 2006-05-01 23:05:26.000000000 +0900
        @@ -3401,8 +3401,10 @@
        /* No antialiasing by default (do not attempt to touch antialising
        * options on pre-Jaguar) */
        fontOptions =
        +#if 0
        (gMacSystemVersion >= 0x1020) ?
        kATSStyleNoAntiAliasing :
        +#endif
        kATSStyleNoOptions;

        ATSUAttributeTag attribTags[] =
        @@ -4018,6 +4020,14 @@
        (gFontStyle ? &gFontStyle : NULL),
        &textLayout) == noErr)
        {
        + ATSUAttributeTag tags[] = {kATSULineLayoutOptionsTag};
        + ByteCount sizes[] = {sizeof(ATSLineLayoutOptions)};
        + /*XXX is this the correct options? */
        + ATSLineLayoutOptions opts = kATSLineUseDeviceMetrics
        + | kATSLineDisableAllLayoutOperations;
        + ATSUAttributeValuePtr values[] = {&opts};
        + ATSUSetLayoutControls(textLayout, 1, tags, sizes, values);
        +
        ATSUSetTransientFontMatching(textLayout, TRUE);

        ATSUDrawText(textLayout,
        ===========================================================================

        >Please let me know if
        >(b) if there are situations (certain fonts? CJK or other non-ASCII
        >characters?) where 'macatsui' gives better results.

        With 'nomacatsui', there seems to be some problems in editing Japanese
        text, although I haven't tried all the possible combinations of
        encoding/fileencoding/termencoding.
      • Benji Fisher
        ... Thanks for giving this a try. I tested your patch, and at first it seemed to fix the problems with Monaco:h9, but with further testing I ran into problems
        Message 3 of 4 , May 3, 2006
          On Tue, May 02, 2006 at 01:09:14AM +0900, Jun T. wrote:
          > At 17:14 -0400 06.4.30, Benji Fisher wrote:
          > >2. Font rendering is still problematic, but you can recover the older
          > >method of font rendering with
          > >
          > >:set nomacatsui
          > >
          > >In my testing, if I set 'nomacatsui' and 'noantialias' then fonts look
          > >normal. Also, I only see problems with certain fonts, such as Monaco;
          >
          > With 'set nomacatsui', I notice no problem not only with 'noantialias'
          > but also with 'antialias' even for Monaco font.
          >
          > With 'set macatsui', Monaco font does have some problems
          > (e.g., gfn=Monaco:h9).
          > The following patch seems to solve (at least some of) the ATSUI
          > rendering problems:

          Thanks for giving this a try. I tested your patch, and at first it
          seemed to fix the problems with Monaco:h9, but with further testing I
          ran into problems again. I do not yet have a way to reproduce it.

          Perhaps the original version had the two choices for fontOptions
          backwards? If so, then your patch may cause problems if anyone is still
          using OS X 10.1.x.

          Can you explain what the intent of the change is? That would make
          it easier to test whether this is really an improvement.

          > ===========================================================================
          > --- vim70f/src/gui_mac.c 2006-04-24 22:26:47.000000000 +0900
          > +++ vim70f2/src/gui_mac.c 2006-05-01 23:05:26.000000000 +0900
          > @@ -3401,8 +3401,10 @@
          > /* No antialiasing by default (do not attempt to touch antialising
          > * options on pre-Jaguar) */
          > fontOptions =
          > +#if 0
          > (gMacSystemVersion >= 0x1020) ?
          > kATSStyleNoAntiAliasing :
          > +#endif
          > kATSStyleNoOptions;
          >
          > ATSUAttributeTag attribTags[] =
          > @@ -4018,6 +4020,14 @@
          > (gFontStyle ? &gFontStyle : NULL),
          > &textLayout) == noErr)
          > {
          > + ATSUAttributeTag tags[] = {kATSULineLayoutOptionsTag};
          > + ByteCount sizes[] = {sizeof(ATSLineLayoutOptions)};
          > + /*XXX is this the correct options? */
          > + ATSLineLayoutOptions opts = kATSLineUseDeviceMetrics
          > + | kATSLineDisableAllLayoutOperations;
          > + ATSUAttributeValuePtr values[] = {&opts};
          > + ATSUSetLayoutControls(textLayout, 1, tags, sizes, values);
          > +
          > ATSUSetTransientFontMatching(textLayout, TRUE);
          >
          > ATSUDrawText(textLayout,
          > ===========================================================================
          >
          > >Please let me know if
          > >(b) if there are situations (certain fonts? CJK or other non-ASCII
          > >characters?) where 'macatsui' gives better results.
          >
          > With 'nomacatsui', there seems to be some problems in editing Japanese
          > text, although I haven't tried all the possible combinations of
          > encoding/fileencoding/termencoding.

          That is good to know. Thanks again.

          --Benji Fisher
        • Jun T.
          First of all, I was wrong in ... Monaco:h9 seems to have a problem with nomacatsui and with antialias, isn t it? ... I m not a Mac programing expert. I just
          Message 4 of 4 , May 4, 2006
            First of all, I was wrong in

            On Tue, May 02, 2006 at 01:09:14AM +0900, Jun T. wrote:
            > With 'set nomacatsui', I notice no problem not only with 'noantialias'
            > but also with 'antialias' even for Monaco font.

            Monaco:h9 seems to have a problem with nomacatsui and with antialias,
            isn't it?

            At 13:15 -0400 06.5.3, Benji Fisher wrote:
            > Can you explain what the intent of the change is?

            I'm not a Mac programing expert. I just Googled and found that
            a few pages are mentioning that ATSLineLayoutOptions should be
            set correctly. I also looked into the source code of Carbon
            version of emacs and found ATSLineLayoutOptions is set to
            'kATSLineUseDeviceMetrics | kATSLineDisableAllLayoutOperations'.

            I guess kATSLineUseDeviceMetrics is to use rounded (integer)
            positioning (spacing) instead of the fractional positioning. kATSLineDisableAllLayoutOperations is to disable layout adjustment
            such as kerning, but omitting it from ATSLineLayoutOptions seems
            to have no effect.

            Both options are documented in ATSUI API manual; It seems that
            there is also a (undocumented?) option kATSLineFractDisable to
            disable fractional spacing (positioning), but including it in
            ATSLineLayoutOptions seems to have no effect.

            jun
          Your message has been successfully submitted and would be delivered to recipients shortly.