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

Re: improved Vim.app in latest version

Expand Messages
  • 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 1 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 2 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.