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

Re: [patch] hardcopy patch for vim-6.2

Expand Messages
  • Yasuhiro Matsumoto
    Motonobu Ichimura - ... Hi. I tried your patch. and it works fine for me. I add one correction to this patch. shift_jis encoding has some characters which
    Message 1 of 6 , Oct 23, 2003
    • 0 Attachment
      Motonobu Ichimura -
      >Hi
      >
      >I updated a patch to enable hardcopy with multibyte chars for vim-6.2.
      >(honestly, this patch is my first attempt for vim 6.2, so in a very early
      >stage.)
      >
      >this patch's approach is
      >
      >1) vim 6.2 have ps-resources for each locales (in print directory), so
      >2) prepare ps resources for multibyte locales. (these resouces defines
      > PS font for multibyte.)
      >3) if vim can find resources for multibyte, use it.
      >
      >with this approach, we can select our favorite PS fonts using
      >~/.vim/print/some-mb-locale.ps.
      >
      >you can obtain this patch at
      >
      >http://www.momonga-linux.org/~famao/vim-6.2-hardcopy-multibyte.tar.gz
      >
      >Regards,
      >famao.

      Hi.
      I tried your patch. and it works fine for me.

      I add one correction to this patch.
      shift_jis encoding has some characters which contain backslash at
      trail-byte.

      *** src/ex_cmds2.c~ Fri Oct 24 12:17:49 2003
      --- src/ex_cmds2.c Fri Oct 24 12:18:11 2003
      ***************
      *** 5344,5349 ****
      --- 5344,5351 ----
      } else {
      int i;
      for (i = 0; i < len; i++) {
      + if (p[i] == '\\')
      + ga_append (&prt_ps_buffer, p[i]);
      ga_append (&prt_ps_buffer, p[i]);
      }
      }
      --

      Regards,
      Thanks.

      - Yasuhiro

      _________________________________________________________________
      The new MSN 8: advanced junk mail protection and 2 months FREE*
      http://join.msn.com/?page=features/junkmail
    • Bram Moolenaar
      ... Sounds good. Since I hardly use multi-byte files I m not a good tester for this patch. Did you communicate with Mike Williams? He did most of the
      Message 2 of 6 , Oct 24, 2003
      • 0 Attachment
        Motonobu Ichimura wrote:

        > I updated a patch to enable hardcopy with multibyte chars for vim-6.2.
        > (honestly, this patch is my first attempt for vim 6.2, so in a very
        > early stage.)
        >
        > this patch's approach is
        >
        > 1) vim 6.2 have ps-resources for each locales (in print directory), so
        > 2) prepare ps resources for multibyte locales. (these resouces defines
        > PS font for multibyte.)
        > 3) if vim can find resources for multibyte, use it.
        >
        > with this approach, we can select our favorite PS fonts using
        > ~/.vim/print/some-mb-locale.ps.
        >
        > you can obtain this patch at
        >
        > http://www.momonga-linux.org/~famao/vim-6.2-hardcopy-multibyte.tar.gz

        Sounds good. Since I hardly use multi-byte files I'm not a good tester
        for this patch.

        Did you communicate with Mike Williams? He did most of the printing
        functionality.

        --
        [clop clop]
        ARTHUR: Old woman!
        DENNIS: Man!
        ARTHUR: Man, sorry. What knight lives in that castle over there?
        DENNIS: I'm thirty seven.
        ARTHUR: What?
        DENNIS: I'm thirty seven -- I'm not old!
        The Quest for the Holy Grail (Monty Python)

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
      • Mike Williams
        Hi, I ll have a look at the patch. I have been snowed under with work this Summer but I have a couple of weeks vacation shortly and plan to sort out multi-byte
        Message 3 of 6 , Oct 24, 2003
        • 0 Attachment
          Hi,

          I'll have a look at the patch.

          I have been snowed under with work this Summer but I have a couple of
          weeks vacation shortly and plan to sort out multi-byte printing. The
          biggest issue is how to handle specifying font, character set, and
          encoding from VIM in a sensible way.

          One nasty issue is that some multi-byte fonts only contain a subset
          of the character sets implied by an encoding, especially some of the
          free ones. I have seen a few which do not contain ASCII characters
          where it would should be ok to use Courier, but how to tell VIM to do
          this?

          Any suggestins more than welcome.

          On 24 Oct 2003 at 12:47, Bram Moolenaar wrote:

          >
          > Motonobu Ichimura wrote:
          >
          > > I updated a patch to enable hardcopy with multibyte chars for vim-6.2.
          > > (honestly, this patch is my first attempt for vim 6.2, so in a very
          > > early stage.)
          > >
          > > this patch's approach is
          > >
          > > 1) vim 6.2 have ps-resources for each locales (in print directory), so
          > > 2) prepare ps resources for multibyte locales. (these resouces defines
          > > PS font for multibyte.)
          > > 3) if vim can find resources for multibyte, use it.
          > >
          > > with this approach, we can select our favorite PS fonts using
          > > ~/.vim/print/some-mb-locale.ps.
          > >
          > > you can obtain this patch at
          > >
          > > http://www.momonga-linux.org/~famao/vim-6.2-hardcopy-multibyte.tar.gz
          >
          > Sounds good. Since I hardly use multi-byte files I'm not a good tester
          > for this patch.
          >
          > Did you communicate with Mike Williams? He did most of the printing
          > functionality.
          >
          > --
          > [clop clop]
          > ARTHUR: Old woman!
          > DENNIS: Man!
          > ARTHUR: Man, sorry. What knight lives in that castle over there?
          > DENNIS: I'm thirty seven.
          > ARTHUR: What?
          > DENNIS: I'm thirty seven -- I'm not old!
          > The Quest for the Holy Grail (Monty Python)
          >
          > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          > /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
          > \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
          > \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///

          Mike
          --
          Nakedness is seldom seen but often noticed. - Chinese Proverb
        • Camillo Särs
          ... Mozilla seems to do a fairly good job at combining several different fonts to display Unicode sample pages. I believe the basic algorithm is if this font
          Message 4 of 6 , Oct 24, 2003
          • 0 Attachment
            Mike Williams wrote:
            > Any suggestins more than welcome.

            Mozilla seems to do a fairly good job at combining several different fonts to
            display Unicode sample pages. I believe the basic algorithm is "if this font
            doesn't have it, let's look at some others". :)

            Anyway, you might want to take a look at the Mozilla code for inspiration. I
            haven't seen it, and it may just be a complete waste of time, but who knows.

            Regards,
            Camillo
            --
            Camillo Särs <+ged+@...> ** Aim for the impossible and you
            <http://www.iki.fi/+ged> ** will achieve the improbable.
            PGP public key available **
          • Mike Williams
            ... This is relatively straightforward, PS font files have associated descriptor files that are relatively easy to parse, but the decision to date has been to
            Message 5 of 6 , Oct 24, 2003
            • 0 Attachment
              On 24 Oct 2003 at 15:55, Camillo Särs wrote:

              > Mike Williams wrote:
              > > Any suggestins more than welcome.
              >
              > Mozilla seems to do a fairly good job at combining several different fonts to
              > display Unicode sample pages. I believe the basic algorithm is "if this font
              > doesn't have it, let's look at some others". :)

              This is relatively straightforward, PS font files have associated
              descriptor files that are relatively easy to parse, but the decision
              to date has been to not add this functionality to VIM. This means
              the user has to tell VIM what fonts to use for specific ranges. As a
              gross generalisation a multi-byte encoding contains an ASCII(ish)
              character set, a basic multi-byte character set and an extended multi-
              byte character set (typically more rarely used characters) - that can
              be a lot of info that needs specifying to be able to print.

              (If the font desccriptor file parser was added then alternate fixed
              width fonts could be used for 8-bit printing as well.)

              TTFN

              Mike
              --
              Swing dead cat by the tail? More fun using live ones.
            Your message has been successfully submitted and would be delivered to recipients shortly.