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

Re: add multibyte support for hardcopy

Expand Messages
  • Mike Williams
    Hi, I have a few comments. I am no expert in CJKV typography (how to layout the characters) but have experience in the PostScript used to them out, so please
    Message 1 of 9 , Nov 10, 2002

      I have a few comments. I am no expert in CJKV typography (how to
      layout the characters) but have experience in the PostScript used to
      them out, so please excuse me if I ask any silly questions. I
      haven't seen the full set of patches so I may have missed some things
      answered there.

      I would suggest separating the CMap name from the font name. It may
      be useful to change the CMap name based on the platform - for example
      CMap 90ms-RKSJ-H supports Windows 3.1J and 95J characters sets. To
      the support the Apple Macintosh Traditional Chinese character set you
      need to use B5pc-H CMap. The font and CMap names can be joined
      together when generating the output file.

      A CMap defines the character collection to be used for printing, so
      is also dependent on the display font being used if you want to be
      able to print all the characters in the file. For example, the CMap
      Ext-RKSJ-H includes IBM extensions to the JIS X 0208 character set,
      or ETen-B5-H for the Big Fice character set with the ETen extensions.

      A CMap can also defines the encoding. While RKSJ-H uses EUC-JP and
      Shift-JIS, UniJIS-UCS2-H uses UCS-2 and UniJIS-UTF8-H uses UTF-8.
      The Chinese and Korean character collections support additional
      encodings as well.

      The Courier font used for latin1 encoded files has a width of .6 of
      the selected font height which is font specific (but common to Roman,
      Bold, and Italic versions of Courier). Have you been able to find
      the font metrics for the CID fonts? If not I guess you may be seeing
      an odd spacing between lines (too big a gap is my guess).

      Also, CID fonts can include half-width and proportional versions of
      Latin characters. Are you mapping these back to the full-width
      versions? Or leaving them as they are? Or is this not a problem?

      Another thing to be aware of is that some Adobe documented CMaps may
      not be available on a printer. The behaviour of a printer is
      unpredictable when this happens - it may not print anything, it may
      substitute a default CMap, or it may even revert to printing as
      single byte encoded using Courier or Helvetica. Has anyone tried

      There are a number of PDFs on CID fonts and CMaps publicly available
      at http://partners.adobe.com/asn/developer/technotes/fonts.html
      In particular Technical Note 5094 may be of interest as it lists the
      current standard Adobe CMaps for Chinese, Japanese and Korean CID

      I am happy to help, do, or review any PostScript coding to support
      multi-byte printing in VIM. Just drop me a line.


      On 7 Nov 2002 at 12:00, Yasuhiro Matsumoto wrote:

      > >Hi.
      > >
      > >:hardcopy doesn't support multibyte characters,
      > >so I wrote a patch to support it.
      > >
      > >Currently this patch (can apply from 6.0 to 6.1.247) enables
      > >
      > >Japanese EUC-JP
      > >Japanese SJIS
      > >Korean EUC-KR
      > >Chinese Big5
      > >Chinese GB2312
      > >
      > >codeset to print PS file. (PS fontnames are hardcoded yet.)
      > >
      > >some screenshots (output ps file using :hardcopy and view with gv) are
      > >available at
      > Hello Ichimura.
      > I tried your patch, it's great!.
      > It is coincidence, I was just talking about this problem
      > with Mike Williams and Bram at last month.
      > I guess that it need bit's change. :-)
      > I could output ps file on win32 with this patch.
      > (I made this patch against your patch.)
      > BTW)
      > As bram said, there is a problem about
      > "How to select the printer fonts."
      > I think, it is very difficult for vim to select a CMap.
      > Maybe, most users has the other way to output ps like a2ps.
      > I think, vim don't need to change more after this patch.
      > Thanks.

      One good thing about repeating your mistakes is that you know when to cringe.
    Your message has been successfully submitted and would be delivered to recipients shortly.