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

Re: [patch] fix ATSUI support, fix CJK (wide) character rendering, fix TSM support

Expand Messages
  • Jjgod Jiang
    Hi, ... Thanks, I ve uploaded it to http://wiki.macvim.org/wiki/VimPatches/ATSUI - jjgod.
    Message 1 of 8 , Mar 8, 2007
      Hi,

      2007/3/8, Nicolas Weber <nicolasweber@...>:
      > sadly, this mailing list strips attachments for some reason. Please
      > repost your patch to vim-dev@... or upload your patch to
      > wiki.macvim.org.

      Thanks, I've uploaded it to http://wiki.macvim.org/wiki/VimPatches/ATSUI

      - jjgod.
    • Alan G Isaac
      ... Does this mean that I won t have to set nomacatsui anymore? Cheers, Alan Isaac
      Message 2 of 8 , Mar 8, 2007
        On Thu, 8 Mar 2007, Jjgod Jiang apparently wrote:
        > 1. Use kATSUImposeWidthTag to set font width equal to
        > gui.char_width. This makes sure offset calculation in
        > ATSUI rendering is correct.

        Does this mean that I won't have to set nomacatsui anymore?

        Cheers,
        Alan Isaac
      • Panos Laganakos
        Thanks for the patch Jjgod. ... -- Panos Laganakos
        Message 3 of 8 , Mar 8, 2007
          Thanks for the patch Jjgod.

          On 3/8/07, Alan G Isaac <aisaac@...> wrote:
          > On Thu, 8 Mar 2007, Jjgod Jiang apparently wrote:
          > > 1. Use kATSUImposeWidthTag to set font width equal to
          > > gui.char_width. This makes sure offset calculation in
          > > ATSUI rendering is correct.
          >
          > Does this mean that I won't have to set nomacatsui anymore?
          >
          > Cheers,
          > Alan Isaac
          >
          >
          >
          >
          >


          --
          Panos Laganakos
        • Arnaud BARRÉ
          Hi, Like I want to use the services menu in Vim, I m really happy to see that your patch active them. So, I have tried to apply your patch to the vim 7.0.215
          Message 4 of 8 , Mar 8, 2007
            Hi,

            Like I want to use the services menu in Vim, I'm really happy to see
            that your patch active them.
            So, I have tried to apply your patch to the vim 7.0.215 sources but I
            have an error :

            Command output: patching file src/gui_mac.c
            Hunk #6 succeeded at 2023 with fuzz 1.
            Hunk #7 FAILED at 2088.
            Hunk #8 FAILED at 2103.
            Hunk #9 succeeded at 2878 (offset 15 lines).
            Hunk #10 succeeded at 2948 (offset 15 lines).
            Hunk #11 succeeded at 3049 (offset 15 lines).
            Hunk #12 succeeded at 3165 (offset 15 lines).
            Hunk #13 succeeded at 3255 (offset 15 lines).
            Hunk #14 succeeded at 3425 (offset 15 lines).
            Hunk #15 succeeded at 3495 (offset 15 lines).
            Hunk #16 succeeded at 3553 (offset 15 lines).
            Hunk #17 succeeded at 3624 (offset 15 lines).
            Hunk #18 succeeded at 3660 (offset 15 lines).
            Hunk #19 succeeded at 4047 (offset 15 lines).
            Hunk #20 succeeded at 4085 (offset 15 lines).
            Hunk #21 succeeded at 6253 (offset 13 lines).
            2 out of 21 hunks FAILED -- saving rejects to file src/gui_mac.c.rej

            Theses hunks are :
            -------------------------------------------------------------------------------------------
            @@ -2027,12 +2088,13 @@
            char_u *to = NULL;
            Boolean isSpecial = FALSE;
            int i;
            - EventRef keyEvent;
            + EventRef keyEvent;

            /* Mask the mouse (as per user setting) */
            if (p_mh)
            ObscureCursor();

            + UInt32 eventKind = GetEventKind(theEvent);
            /* Don't use the keys when the dialog wants them. */
            if (dialog_busy)
            return eventNotHandledErr;
            @@ -2041,6 +2103,7 @@
            typeUnicodeText, NULL, 0, &actualSize, NULL))
            return eventNotHandledErr;

            + // fprintf(stderr, "actualSize = %d\n", actualSize);
            text = (UniChar *)alloc(actualSize);
            if (!text)
            return eventNotHandledErr;
            -------------------------------------------------------------------------------------------

            The second is not necessary so i delete it. The first seems not
            necessary too because
            'eventKind' in 'UInt32 eventKind = GetEventKind(theEvent)' isn't used
            after this line. So I delete this hunk too.

            I compile Vim 7.0.215 with this modified patch and I have no problem.
            I launch a graphical Vim session from the terminal without any problem.

            To try the services menu i type some characters in Vim and I select
            them. However, no service in the services menu is usable.

            If I look in the terminal window I can see some "eventKind = 2" lines.
            Theses lines are the results of the characters typed in the Vim's
            window.

            I hope this report can help you,

            Regards,

            Arnaud


            On 3/8/07, Jjgod Jiang <gzjjgod@...> wrote:
            > Hi,
            >
            > The patch attach fixed the following stuff:
            >
            > 1. Use kATSUImposeWidthTag to set font width equal to gui.char_width. This
            > makes sure offset calculation in ATSUI rendering is correct.
            >
            > 2. Use a different style object called gWideFontStyle to support CJK character
            > rendering, which must be 2 * gui.char_width in width.
            >
            > 3. Add NewTSMDocument, ActivateTSMDocument in gui_mch_init() to improve
            > Text Service Manager (for Input Method) support.
            >
            > Please review and test it as needed. It will be a great help to most CJK gvim
            > users if this patch can be merged into trunk. ;)
            >
            > - jjgod.
            >
          • Jjgod Jiang
            Hi, ... Well, what I m talking about Text Service Manager is not the same with those Services provided in your Application- Services menu, instead, I mean
            Message 5 of 8 , Mar 8, 2007
              Hi,

              2007/3/9, Arnaud BARRÉ <arnaud.barre@...>:
              > Hi,
              >
              > Like I want to use the services menu in Vim, I'm really happy to see
              > that your patch active them.

              Well, what I'm talking about "Text Service Manager" is not the same with
              those Services provided in your Application->Services menu, instead, I
              mean those text services lists in your keyboard menu. For more information,
              please refer to:

              http://developer.apple.com/documentation/Carbon/Conceptual/UnderstandTextInput_TSM/index.html

              (I understand it's pretty confusing..

              What needs to be done to support those cocoa services you mentioned in
              Carbon app is another question needs to be investigated, which I don't
              have time to do yet. But I'll keep that in mind.

              > The second is not necessary so i delete it. The first seems not
              > necessary too because
              > 'eventKind' in 'UInt32 eventKind = GetEventKind(theEvent)' isn't used
              > after this line. So I delete this hunk too.

              > If I look in the terminal window I can see some "eventKind = 2" lines.
              > Theses lines are the results of the characters typed in the Vim's
              > window.

              Yep, you can safely remove that. It's part of some experimental hack,
              I still working on full support to Text Services Manager.

              > I hope this report can help you,

              Thank you.

              - jjgod.
            • Arnaud BARRÉ
              Hi, Thanks to explain me what does the TSM. In fact I want that :
              Message 6 of 8 , Mar 8, 2007
                Hi,

                Thanks to explain me what does the TSM.

                In fact I want that :
                http://developer.apple.com/documentation/Carbon/Conceptual/appservices/tasks/chapter_3_section_2.html#//apple_ref/doc/uid/TP30000993-CH206-CJBGBHBJ

                So now, I have just to implement it ...

                Regards,

                Arnaud


                On 3/8/07, Jjgod Jiang <gzjjgod@...> wrote:
                > Hi,
                >
                > 2007/3/9, Arnaud BARRÉ <arnaud.barre@...>:
                > > Hi,
                > >
                > > Like I want to use the services menu in Vim, I'm really happy to see
                > > that your patch active them.
                >
                > Well, what I'm talking about "Text Service Manager" is not the same with
                > those Services provided in your Application->Services menu, instead, I
                > mean those text services lists in your keyboard menu. For more information,
                > please refer to:
                >
                > http://developer.apple.com/documentation/Carbon/Conceptual/UnderstandTextInput_TSM/index.html
                >
                > (I understand it's pretty confusing..
                >
                > What needs to be done to support those cocoa services you mentioned in
                > Carbon app is another question needs to be investigated, which I don't
                > have time to do yet. But I'll keep that in mind.
                >
                > > The second is not necessary so i delete it. The first seems not
                > > necessary too because
                > > 'eventKind' in 'UInt32 eventKind = GetEventKind(theEvent)' isn't used
                > > after this line. So I delete this hunk too.
                >
                > > If I look in the terminal window I can see some "eventKind = 2" lines.
                > > Theses lines are the results of the characters typed in the Vim's
                > > window.
                >
                > Yep, you can safely remove that. It's part of some experimental hack,
                > I still working on full support to Text Services Manager.
                >
                > > I hope this report can help you,
                >
                > Thank you.
                >
                > - jjgod.
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.