On Wed, Jan 06, 2010 at 06:20:42AM EST, Mike Williams wrote: > Hi, > > I wrote the original PS driver for VIM, several years ago now. This is > somewhat OT from the OP as it is not Windows related.
I think he wrote somewhere that he prints from Windows because his printer is better supported. > If you are not interested, stop reading now. I'm not sure who wouldn't be. As far as I'm concerned, you are salvaging the thread from guesswork and speculations, thank goodness for that. > The PS driver relies on fonts being present in the printer. The only > ones guaranteed to be there are the base 35 western fonts (Courier, > Times, etc). However, far east printers will have a few multi-byte > fonts to support CJK printing, for which the printmbcharset et al > options and handling of multi-byte encodings was added. It is > possible to install additional multi-byte fonts on the printer which > could also be used I have an old HP LaserJet 2100 that's still running on the original cartridge. Do you mean that if I wanted to be able to use :hardcopy to successfully print any character from the Unicode BMP, I would be able to do so after installing a universal font such as GNU/Unifont on the printer? > Technically PostScript is text encoding agnostic - it just deals with > sequences of byte values. The selected font defines how to interpret > the byte sequence, as single bytes or a multi-byte encoding of some > kind. So, in a UTF-8 context and with multi-byte characters, I'm still unclear as to why I can use paps to create a .ps file that will print correctly on my printer, and unable to use Vim's :hardcopy command to do the same thing. Why can't the :hardcopy command perform the same magic? > A lot depends on the characters being used. If you are using UTF-8 > encoding for text that exists in a single ISO-8859 character set then > you can just set printencoding and VIM should translate the UTF-8 > encoded text to single bytes for printing. If you are using > characters from multiple ISO-8859 character sets then things start to > get complicated. > If you are just using ISO-8859 characters then it would be possible > (but not currently implemented) to support many such character sets > when printing with a single font. > If you are using true multiple-byte characters (i.e. ones not present > in any of the ISO-8859 or cp character sets) then you will need to > use a multi-byte font and the big issue is with handling them - their > discovery on the host system, metrics calculation for text layout, > selection of a sub-set of the contents (multi-byte fonts tend to be > large - do you want to generate a 12MB PS file to print <1K of text?), > and embedding in the generated PS. Yes, GNU/unifont, at least the file on my HDD is 16MB and it would hardly make sense to download it to the printer with each an every print job. But that would not be necessary if the font resided on the printer. In any event, the size of the .ps file created by paps from an one-line Vim buffer containing 'Bột bột' and nothing else is only 7.2. I looked at a 16K UTF8-encoded text file containing multi-byte characters and the resulting .ps file that paps created was 329K. So, I definitely missing something [some things] :-) > Not a trivial problem to solve at the time. When discussed with Bram > it was decided this was not wanted. Dunno if time has changed the > argument at all. Maybe these aspects should be clarified under :h postscript-printing under limitations:multi-byte support. Sorry if I'm asking the wrong questions, I don't know Postscript and I have no experience with printers. > TTFN > > Mike > -- > yip yip yip yip yap yap yip *BANG* - NO TERRIER That can't have been a *BULL*Terrier, then.. ;-) CJ
-- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php
