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

Re: Vim Support for Syriac

Expand Messages
  • A.J.Mechelynck
    ... If I were you, I d have a serious hard look at arabic.c and arabic.h in the src/ subdirectory of wherever you downloaded (or will have downloaded) the Vim
    Message 1 of 11 , Aug 17, 2006
    • 0 Attachment
      Tony Khoshaba wrote:
      > Hi,
      > I am interested in adding support for Syriac in Vim. Syriac is similar to Arabic, Hebrew, and Farsi. It is right-to-left and has its own shaping rules.
      >
      > Where do I start? I will appreciate your help.
      >
      > Thanks
      > Tony Khoshaba
      >

      If I were you, I'd have a serious hard look at arabic.c and arabic.h in
      the src/ subdirectory of wherever you downloaded (or will have
      downloaded) the Vim source. IIUC, the rules for Syriac should be similar
      to those for Arabic, except that the Unicode blocks for isolated glyphs
      and for presentation forms (i.e., initial, medial, final and possibly
      digraph or multicharacter forms if any) would be different, and that any
      "national.


      Bset regards,
      Tony.
    • A.J.Mechelynck
      ... If I were you, I d have a serious hard look at arabic.c and arabic.h in the src/ subdirectory of wherever you downloaded (or will have downloaded) the Vim
      Message 2 of 11 , Aug 17, 2006
      • 0 Attachment
        Tony Khoshaba wrote:
        > Hi,
        > I am interested in adding support for Syriac in Vim. Syriac is similar to Arabic, Hebrew, and Farsi. It is right-to-left and has its own shaping rules.
        >
        > Where do I start? I will appreciate your help.
        >
        > Thanks
        > Tony Khoshaba
        >

        If I were you, I'd have a serious hard look at arabic.c and arabic.h in
        the src/ subdirectory of wherever you downloaded (or will have
        downloaded) the Vim source. IIUC, the rules for Syriac should be similar
        to those for Arabic, except that the Unicode blocks for isolated glyphs
        and for presentation forms (i.e., initial, medial, final and possibly
        digraph or multicharacter forms if any) would be different, and that any
        "national ISO-8859-n encoding" would also be different.


        Bset regards,
        Tony.
      • Tony Khoshaba
        If you were to create a list things to do to do this project what would it be? Tony ... If I were you, I d have a serious hard look at arabic.c and arabic.h in
        Message 3 of 11 , Aug 17, 2006
        • 0 Attachment
          If you were to create a list things to do to do this project what would it be?

          Tony

          "A.J.Mechelynck" <antoine.mechelynck@...> wrote: Tony Khoshaba wrote:
          > Hi,
          > I am interested in adding support for Syriac in Vim. Syriac is similar to Arabic, Hebrew, and Farsi. It is right-to-left and has its own shaping rules.
          >
          > Where do I start? I will appreciate your help.
          >
          > Thanks
          > Tony Khoshaba
          >

          If I were you, I'd have a serious hard look at arabic.c and arabic.h in
          the src/ subdirectory of wherever you downloaded (or will have
          downloaded) the Vim source. IIUC, the rules for Syriac should be similar
          to those for Arabic, except that the Unicode blocks for isolated glyphs
          and for presentation forms (i.e., initial, medial, final and possibly
          digraph or multicharacter forms if any) would be different, and that any
          "national ISO-8859-n encoding" would also be different.


          Bset regards,
          Tony.
        • A.J.Mechelynck
          ... 1. Look how the Arabic module does it. 2. Look how the Arabic module is hooked into the main loop. 3. Look in http://www.unicode.org/charts/ how Arabic and
          Message 4 of 11 , Aug 17, 2006
          • 0 Attachment
            Tony Khoshaba wrote:
            > If you were to create a list things to do to do this project what would
            > it be?

            1. Look how the Arabic module does it.
            2. Look how the Arabic module is hooked into the main loop.
            3. Look in http://www.unicode.org/charts/ how Arabic and Syriac Unicode
            blocks (including presentation forms) differ.
            4. Take into account any idiosyncrasies of either language (such as the
            fact that Arabic laam+alif is a mandatory digraph).
            5. Either you can do it, or you can't. If you can, write it. If you
            can't, leave it, but (if possible) upload your notes on the Web. Maybe
            someone else will pick it up where you left.



            Best regards,
            Tony.
          • Tony Khoshaba
            I am motivated to do it. But first would like to outline the list of things to do. I once wrote a rendering engine in Dephi and hooked it to a Windows edit box
            Message 5 of 11 , Aug 17, 2006
            • 0 Attachment
              I am motivated to do it. But first would like to outline the list of things to do.
              I once wrote a rendering engine in Dephi and hooked it to a Windows edit box and used a TTF font for it. That was before Microsoft added Syriac rendering engine to professional XP. But most people do not have access to professional XP.

              To adopt my Syriac TTF fonts for such project what should I do? Sorry for asking basic questions but my knowledge in this area has become rusty and I need to come to speed.

              Tony

              "A.J.Mechelynck" <antoine.mechelynck@...> wrote: Tony Khoshaba wrote:
              > If you were to create a list things to do to do this project what would
              > it be?

              1. Look how the Arabic module does it.
              2. Look how the Arabic module is hooked into the main loop.
              3. Look in http://www.unicode.org/charts/ how Arabic and Syriac Unicode
              blocks (including presentation forms) differ.
              4. Take into account any idiosyncrasies of either language (such as the
              fact that Arabic laam+alif is a mandatory digraph).
              5. Either you can do it, or you can't. If you can, write it. If you
              can't, leave it, but (if possible) upload your notes on the Web. Maybe
              someone else will pick it up where you left.



              Best regards,
              Tony.
            • A.J.Mechelynck
              ... If your Syriac TTF fonts include all the necessary glyphs, they shouldn t be the problem; they should work out of the box once the support for the Syriac
              Message 6 of 11 , Aug 17, 2006
              • 0 Attachment
                Tony Khoshaba wrote:
                >
                > I am motivated to do it. But first would like to outline the list of
                > things to do.
                > I once wrote a rendering engine in Dephi and hooked it to a Windows edit
                > box and used a TTF font for it. That was before Microsoft added Syriac
                > rendering engine to professional XP. But most people do not have access
                > to professional XP.
                >
                > To adopt my Syriac TTF fonts for such project what should I do? Sorry
                > for asking basic questions but my knowledge in this area has become
                > rusty and I need to come to speed.
                >
                > Tony


                If your Syriac TTF fonts include all the necessary glyphs, they
                shouldn't be the problem; they should work "out of the box" once the
                support for the Syriac alphabet will have been built into the C source
                of Vim, just by setting 'guifont', 'rightleft', etc. to proper settings.
                The problem is to have Vim display the proper contextual forms in the
                proper contexts, like it does for Arabic, and that requires a C module
                which should IMHO be very similar to the Arabic one.


                Best regards,
                Tony.
              • Tony Khoshaba
                If this is the case then the project looks easier. Adding Syriac would mean just changing some of the shaping rules for Arabic. But my impression was that
                Message 7 of 11 , Aug 18, 2006
                • 0 Attachment
                  If this is the case then the project looks easier. Adding Syriac would mean just changing some of the shaping rules for Arabic. But my impression was that there is more into font design than just using a TTF font out of the box. Anyway nut I thing I have enough material to work with.

                  So if I start with Windows version of Vim, can I build it straight forwardly using Microsoft VC++ tools?

                  Tony


                  "A.J.Mechelynck" <antoine.mechelynck@...> wrote: Tony Khoshaba wrote:
                  >
                  > I am motivated to do it. But first would like to outline the list of
                  > things to do.
                  > I once wrote a rendering engine in Dephi and hooked it to a Windows edit
                  > box and used a TTF font for it. That was before Microsoft added Syriac
                  > rendering engine to professional XP. But most people do not have access
                  > to professional XP.
                  >
                  > To adopt my Syriac TTF fonts for such project what should I do? Sorry
                  > for asking basic questions but my knowledge in this area has become
                  > rusty and I need to come to speed.
                  >
                  > Tony


                  If your Syriac TTF fonts include all the necessary glyphs, they
                  shouldn't be the problem; they should work "out of the box" once the
                  support for the Syriac alphabet will have been built into the C source
                  of Vim, just by setting 'guifont', 'rightleft', etc. to proper settings.
                  The problem is to have Vim display the proper contextual forms in the
                  proper contexts, like it does for Arabic, and that requires a C module
                  which should IMHO be very similar to the Arabic one.


                  Best regards,
                  Tony.
                • A.J.Mechelynck
                  ... Adding Arabic to Vim required no change in the existing fonts: once I had a gvim with +arabic, I could edit Arabic text, even vocalised Arabic, using the
                  Message 8 of 11 , Aug 18, 2006
                  • 0 Attachment
                    Tony Khoshaba wrote:
                    > If this is the case then the project looks easier. Adding Syriac would
                    > mean just changing some of the shaping rules for Arabic. But my
                    > impression was that there is more into font design than just using a TTF
                    > font out of the box. Anyway nut I thing I have enough material to work
                    > with.
                    >
                    > So if I start with Windows version of Vim, can I build it straight
                    > forwardly using Microsoft VC++ tools?

                    Adding Arabic to Vim required no change in the existing fonts: once I
                    had a gvim with +arabic, I could edit Arabic text, even vocalised
                    Arabic, using the Courier_New font that came with Windows; but Syriac is
                    a "rarer" language than Arabic, you may have to make sure that you have
                    a fixed-width font with Syriac glyphs. Start with Courier_New and use
                    ":set guifont=*" if that doesn't work. After using ":set guifont=*" I
                    recommend to use ":set guifont=<Tab>" to replace the :c part of the font
                    by :cDEFAULT as in (for example) ":set guifont=Courier_New:h12:cDEFAULT"
                    -- with that setting I've been able to see Latin, Russian and Arabic
                    text in a single file (of course, seeing the Arabic text "properly"
                    required toggling the text direction with ":setlocal invrightleft").

                    You should be able to edit the Vim C source with Vim itself, then build
                    it with any set of make, C/C++ compiler and linker that can work
                    together. I have used Borland BCC32 and Cygwin gcc, but yes, MSVC has
                    also been used. In that case, the makefile to use is src/Make_mvc.mak .
                    You may want to set some configuration settings by means of environment
                    variables before running make, but I'm not sure of the details -- MSVC
                    is one compiler I haven't used. You may want to look at the comments in
                    the Make_mvc.mak and/or at how I have built Vim for Windows using BCC
                    and (later) gcc, see
                    http://users.skynet.be/antoine.mechelynck/vim/compile.htm .

                    Once you have a working patch for Vim, don't forget to submit it to Bram
                    for inclusion into the "official" source. ;-)


                    Best regards,
                    Tony.
                  • Tony Khoshaba
                    Great info thank you. I was playing with Courier_New as well. I was wondering what proper tool I can use to just add Syriac to Courier_New and name it
                    Message 9 of 11 , Aug 18, 2006
                    • 0 Attachment
                      Great info thank you. I was playing with Courier_New as well. I was wondering what proper tool I can use to just add Syriac to Courier_New and name it something else so the same way Syriac would be supported along with other languages using the same font.

                      Tony

                      "A.J.Mechelynck" <antoine.mechelynck@...> wrote: Tony Khoshaba wrote:
                      > If this is the case then the project looks easier. Adding Syriac would
                      > mean just changing some of the shaping rules for Arabic. But my
                      > impression was that there is more into font design than just using a TTF
                      > font out of the box. Anyway nut I thing I have enough material to work
                      > with.
                      >
                      > So if I start with Windows version of Vim, can I build it straight
                      > forwardly using Microsoft VC++ tools?

                      Adding Arabic to Vim required no change in the existing fonts: once I
                      had a gvim with +arabic, I could edit Arabic text, even vocalised
                      Arabic, using the Courier_New font that came with Windows; but Syriac is
                      a "rarer" language than Arabic, you may have to make sure that you have
                      a fixed-width font with Syriac glyphs. Start with Courier_New and use
                      ":set guifont=*" if that doesn't work. After using ":set guifont=*" I
                      recommend to use ":set guifont=" to replace the :c part of the font
                      by :cDEFAULT as in (for example) ":set guifont=Courier_New:h12:cDEFAULT"
                      -- with that setting I've been able to see Latin, Russian and Arabic
                      text in a single file (of course, seeing the Arabic text "properly"
                      required toggling the text direction with ":setlocal invrightleft").

                      You should be able to edit the Vim C source with Vim itself, then build
                      it with any set of make, C/C++ compiler and linker that can work
                      together. I have used Borland BCC32 and Cygwin gcc, but yes, MSVC has
                      also been used. In that case, the makefile to use is src/Make_mvc.mak .
                      You may want to set some configuration settings by means of environment
                      variables before running make, but I'm not sure of the details -- MSVC
                      is one compiler I haven't used. You may want to look at the comments in
                      the Make_mvc.mak and/or at how I have built Vim for Windows using BCC
                      and (later) gcc, see
                      http://users.skynet.be/antoine.mechelynck/vim/compile.htm .

                      Once you have a working patch for Vim, don't forget to submit it to Bram
                      for inclusion into the "official" source. ;-)


                      Best regards,
                      Tony.
                    • A.J.Mechelynck
                      ... I don t know how to edit fonts; if you do it, make sure that all your Courier_New glyphs (including the existing Latin glyphs) have exactly the same
                      Message 10 of 11 , Aug 18, 2006
                      • 0 Attachment
                        Tony Khoshaba wrote:
                        > Great info thank you. I was playing with Courier_New as well. I was
                        > wondering what proper tool I can use to just add Syriac to Courier_New
                        > and name it something else so the same way Syriac would be supported
                        > along with other languages using the same font.

                        I don't know how to edit fonts; if you do it, make sure that all your
                        Courier_New glyphs (including the existing Latin glyphs) have exactly
                        the same dimensions: height, width, and height of the top and bottom of
                        a letter like lowercase x relative to the character cell. Anyway, I
                        don't know of any fixed-width font covering the full Unicode range: when
                        editing my front page
                        http://users.skynet.be/antoine.mechelynck/index.htm , which has not only
                        Latin but also Cyrillic (Russian) and East-Asian (Chinese and Japanese)
                        text, I have to change the 'guifont' depending on which part I'm editing.

                        If your Courier_New font hasn't got (even with :cDEFAULT) the Syriac
                        glyphs you need, well, try to find a fixed-with font with a different
                        name, providing the Syriac glyphs, and also if possible the basic Latin
                        glyphs. Or you might want to check if there is a language pack that
                        includes Syriac on the Windows Update site: installing that might be
                        enough to add the required glyphs to Courier_New (and also to common
                        "proportional" fonts like Arial or Times New Roman: Vim cannot use them,
                        but if you create HTML pages in Syriac you can load them in your
                        favourite browser to check that they display OK).


                        Best regards,
                        Tony.
                      Your message has been successfully submitted and would be delivered to recipients shortly.