* Re: Printing from WindowXP version of emacs
@ 2006-01-04 0:34 BRUCE INGALLS
2006-01-04 10:00 ` Peter Dyballa
0 siblings, 1 reply; 21+ messages in thread
From: BRUCE INGALLS @ 2006-01-04 0:34 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 1427 bytes --]
>
> From: Peter Dyballa
> Date: Tue, 3 Jan 2006 10:44:15 +0100
> Subject: Re: Printing from WindowXP version of emacs
>
> > That said, yet another hack is available: there already is code to
> > export emacs buffers to PDF.
>
> Could you drop some names, please?
Feel free to browse http://EMacro.sf.net/ for more of this stuff.
I expect to make a new release, this month.
Here is the relevant code, from e-common.el:
;;Note that ps2pdf might not be installed
(defun save-current-buffer-as-pdf ()
"Export pretty-printed file to PDF format."
(interactive)
(ps-print-buffer-with-faces (concat (buffer-file-name) ".ps"))
(shell-command (concat "ps2pdf " (buffer-file-name) ".ps"))
(delete-file (concat (buffer-file-name) ".ps"))
(message "Done"))
(defvar cache-htmlize) ;shut up compiler
(cache-locate-library
use-cache 'cache-htmlize "htmlize"
"To export as HTML, get htmlize.el from <url:
http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el>")
(when cache-htmlize (require 'htmlize))
(when (or cache-htmlize (which "ps2pdf"))
(easy-menu-change file-menu "Export As"
(list
["PDF" save-current-buffer-as-pdf
(if (which "ps2pdf") t nil)] ;enable only if in PATH
["HTML" htmlize-buffer
(if cache-htmlize t nil)])))
;;note that cache-htmlize can be replaced by a slower call to
locate-library()
[-- Attachment #1.2: Type: text/html, Size: 2297 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-04 0:34 Printing from WindowXP version of emacs BRUCE INGALLS @ 2006-01-04 10:00 ` Peter Dyballa 2006-01-05 1:56 ` BRUCE INGALLS 0 siblings, 1 reply; 21+ messages in thread From: Peter Dyballa @ 2006-01-04 10:00 UTC (permalink / raw) Cc: help-gnu-emacs Am 04.01.2006 um 01:34 schrieb BRUCE INGALLS: > (defun save-current-buffer-as-pdf () Hello Bruce! Your site in German is quite funny -- somehow the words look familiar to me, but the sentences built from them ... am I reading the wrong newspapers and magazines that they don't make much sense to me? Which machine tried to "translate" the original texts? You are using the usual ps-print functions and then ps2pdf to convert PS output to PDF. This is OK for US-ASCII and ISO Latin-1/ISO 8859-1, but it fails already in ISO Latin-9/ISO 8859-15, ISO Latin with €. It works for almost 200 characters, but there are 60,000 more in Unicode (BMP). htmlize.el is a great tool, yes! It seems that it converts every textual buffer contents in any encoding without errors to Unicode (UTF-8) preserving text attributes in HTML. Together with htmlize- view.el, which opens the 'printed' buffer in the default Internet browser, one gets access to the system's native printing dialogues (printer choice, paper format, ...) and mechanisms and does not need to take care of any font issues for characters outside the small US- ASCII/ISO Latin world. For 'Carbon Emacs' on Mac OS X this seems to become the standard printing interface ... although some users and developers seem to have a 'strange' feeling when using this! And it does not need third party software (ps2pdf from Ghostview). -- Greetings Pete The mathematician who pursues his studies without clear views of this matter, must often have the uncomfortable feeling that his paper and pencil surpass him in intelligence. (Ernst Mach) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-04 10:00 ` Peter Dyballa @ 2006-01-05 1:56 ` BRUCE INGALLS 2006-01-05 13:01 ` Peter Dyballa 2006-01-05 16:05 ` translation software (was: Printing from WindowXP version of emacs) Reiner Steib 0 siblings, 2 replies; 21+ messages in thread From: BRUCE INGALLS @ 2006-01-05 1:56 UTC (permalink / raw) Cc: help-gnu-emacs [-- Attachment #1.1: Type: text/plain, Size: 1634 bytes --] On 1/4/06, Peter Dyballa <Peter_Dyballa@web.de> wrote: > > > Am 04.01.2006 um 01:34 schrieb BRUCE INGALLS: > > > (defun save-current-buffer-as-pdf () > > Hello Bruce! > Your site in German is quite funny I don't remember how I translated the pages, but I do know that they need more work. Perhaps I should leave everything in English, but I am trying to accomodate the rest of the world. If you have suggestions, I am open. I have asked for volunteers in the past... > > You are using the usual ps-print functions and then ps2pdf to convert > PS output to PDF. This is OK for US-ASCII and ISO Latin-1/ISO 8859-1, > but it fails already in ISO Latin-9/ISO 8859-15, ISO Latin with €. Thanks for the info. I wonder if the shortcoming is in the PS generation, or in the PDF conversion. I'm sure you could `gsview foo.ps` to find out. htmlize.el is a great tool, yes! For 'Carbon Emacs' on Mac OS X this seems to > become the standard printing interface ... although some users and > developers seem to have a 'strange' feeling when using this! And it > does not need third party software (ps2pdf from Ghostview). Well, it did not take much convincing, to tell me that ps2pdf is not a good solution. Unfortunately, while the htmlview.el printing approach is appealing, it does rely on 3rd party software, namely the web browser (unless you use the lower quality w3.el, which is an optional package). Fortunately, w32, osx & linux/gnome have default browsers, that Emacs can detect. I have included browser detection software in EMacro (ach, weh!) which can help with console mode and other platforms, such as Solaris, bsd, etc. [-- Attachment #1.2: Type: text/html, Size: 2469 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-05 1:56 ` BRUCE INGALLS @ 2006-01-05 13:01 ` Peter Dyballa 2006-01-05 15:41 ` Lennart Borgman 2006-01-05 20:44 ` Eli Zaretskii 2006-01-05 16:05 ` translation software (was: Printing from WindowXP version of emacs) Reiner Steib 1 sibling, 2 replies; 21+ messages in thread From: Peter Dyballa @ 2006-01-05 13:01 UTC (permalink / raw) Cc: help-gnu-emacs Am 05.01.2006 um 02:56 schrieb BRUCE INGALLS: >> You are using the usual ps-print functions and then ps2pdf to convert >> PS output to PDF. This is OK for US-ASCII and ISO Latin-1/ISO 8859-1, >> but it fails already in ISO Latin-9/ISO 8859-15, ISO Latin with €. > > Thanks for the info. I wonder if the shortcoming is in the PS > generation, or > in the PDF conversion. I'm sure you could `gsview foo.ps` to find out. The problem is encoding of the PostScript fonts used to set the document. ps-print.el uses ISO 8859-1, independent from the buffer contents' encoding. If you have a buffer contents that uses more than 192 different characters (256 less two times 32 control characters, 7 bit and 8 bit), you need to provide special PostScript fonts that encode so many characters (CID coded fonts for CJK use), or use the same font with different encodings to have Latin plus some extended Latin (a technique that's used in TeX). The final step of converting PS to PDF only fixes these limitations, it can't change anything since it's still PostScript. It's just of an improved structure embedding all fonts used in the document (leaving out a set of mandatory PS fonts) and this way giving a guarantee that this document will print everywhere and exactly the same. > >> htmlize.el is a great tool, yes! >> >> For 'Carbon Emacs' on Mac OS X this seems to >> become the standard printing interface ... although some users and >> developers seem to have a 'strange' feeling when using this! And it >> does not need third party software (ps2pdf from Ghostview). > > Well, it did not take much convincing, to tell me that ps2pdf is > not a good > solution. > Unfortunately, while the htmlview.el printing approach is > appealing, it does > rely on 3rd party software, namely the web browser (unless you use the > lower quality w3.el, which is an optional package). > > Fortunately, w32, osx & linux/gnome have default browsers, that Emacs > can detect. I have included browser detection software in EMacro > (ach, weh!) > which can help with console mode and other platforms, such as > Solaris, bsd, > etc. I never worked on a BSD UNIX other than SunOS or Mac OS X, but I can't imagine that FreeBSD or NetBSD come without a (kind of third party) browser on their installation disks, and OpenBSD is secure enough that it can afford an Internet browser. They probably have Mozilla, Firefox, Seamonkey well integrated as a native application. Solaris once had HotJava (and OpenWindows) and now uses GNOME as GUI, so it could be viewed as a Linux variant. AIX, Irix and HP-UX will have some sort of Internet browser provided by the manufacturer too. A somehow improved version of printing a htmlize'd buffer or selection contents could be to use print engines in KDE or GNOME, which probably exist. In Mac OS X 10.2 ("Jaguar") Apple 'contributed' kind of a generic 'convertor' for CUPS to convert different input formats (JPEG, GIF, PICT, TIFF, RTF, plain text in MacRoman) to PDF (or PS): Usage: /System/Library/Printers/Libraries/convert [-f <input filename>] [-o <output filename>] [-i <input mimetype>] [-j <output mimetype>] [-P <PPD filename>] [-u] [-a <attribute string>] [-U <username>] [-J <jobname] [-c <copies>] [-D] convert can optimise its PS or PDF output for the printer used via the PPD file, it even uses the user's system default monospaced font -- but only accepted plain text input is MacRoman! And it has to be a file -- no pipe allowed! To convert other text encodings you would have to use lossy iconv -c (otherwise no output at all!) to a file and feed this file to convert. But -- htmlize'ing first, convert now makes no fault with "-i text/html" and everything is printed fine! (Some optimisation in fonts and sizes might be fine, in a personal CSS file.) Using this 'Unicode encoded' HTML file all is preserved: the font used in Emacs, the font faces, its colours (the line breaks are not great yet). All that's needed is an efficient convertor from HTML to the printing systems native input format ... and maybe a button to open the system's native print dialogue! -- Greetings Pete I obviously had too much to dream last night ... ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-05 13:01 ` Peter Dyballa @ 2006-01-05 15:41 ` Lennart Borgman 2006-01-05 21:17 ` Peter Dyballa 2006-01-05 20:44 ` Eli Zaretskii 1 sibling, 1 reply; 21+ messages in thread From: Lennart Borgman @ 2006-01-05 15:41 UTC (permalink / raw) Cc: help-gnu-emacs Peter Dyballa wrote: > > The problem is encoding of the PostScript fonts used to set the > document. ps-print.el uses ISO 8859-1, independent from the buffer > contents' encoding. If you have a buffer contents that uses more than > 192 different characters (256 less two times 32 control characters, 7 > bit and 8 bit), you need to provide special PostScript fonts that > encode so many characters (CID coded fonts for CJK use), or use the > same font with different encodings to have Latin plus some extended > Latin (a technique that's used in TeX). It is not clear to me whether you mean that this is a bug in ps-print.el or that it is a limitation in the current handling of fonts in PostScript. I am sorry that I do not understand this yet, but can you explain the status of this again? ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-05 15:41 ` Lennart Borgman @ 2006-01-05 21:17 ` Peter Dyballa 2006-01-06 8:39 ` Eli Zaretskii 0 siblings, 1 reply; 21+ messages in thread From: Peter Dyballa @ 2006-01-05 21:17 UTC (permalink / raw) Cc: help-gnu-emacs Am 05.01.2006 um 16:41 schrieb Lennart Borgman: > Peter Dyballa wrote: > >> The problem is encoding of the PostScript fonts >> used to set the document. ps-print.el uses ISO 8859-1, >> independent from the buffer contents' encoding. If you have a >> buffer contents that uses more than 192 different characters (256 >> less two times 32 control characters, 7 bit and 8 bit), you need >> to provide special PostScript fonts that encode so many >> characters (CID coded fonts for CJK use), or use the same font >> with different encodings to have Latin plus some extended Latin >> (a technique that's used in TeX). > > It is not clear to me whether you mean that this is a bug in ps- > print.el or that it is a limitation in the current handling of > fonts in PostScript. I am sorry that I do not understand this yet, > but can you explain the status of this again? It is both! ps-print.el destroys the original encoding, and PS usually handles font encodings with up to 256 mappings. (And ps- print.el has no code to handle CID encoded fonts with up to 64 K mappings.) -- Greetings Pete (: _ / __ - - _/ \__/_/ - - (´`) (´`) - - `´ `´ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-05 21:17 ` Peter Dyballa @ 2006-01-06 8:39 ` Eli Zaretskii 0 siblings, 0 replies; 21+ messages in thread From: Eli Zaretskii @ 2006-01-06 8:39 UTC (permalink / raw) > From: Peter Dyballa <Peter_Dyballa@web.de> > Date: Thu, 5 Jan 2006 22:17:22 +0100 > Cc: help-gnu-emacs@gnu.org > > > It is not clear to me whether you mean that this is a bug in ps- > > print.el or that it is a limitation in the current handling of > > fonts in PostScript. I am sorry that I do not understand this yet, > > but can you explain the status of this again? > > It is both! ps-print.el destroys the original encoding, and PS > usually handles font encodings with up to 256 mappings. (And ps- > print.el has no code to handle CID encoded fonts with up to 64 K > mappings.) Would you please stop spreading incorrect information? Emacs includes ps-mule.el, which is an add-on to ps-print that allows Emacs to print any characters supported by Emacs on a PostScript printer. Perhaps you should look at the code before you talk about what is and what isn't a bug there. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-05 13:01 ` Peter Dyballa 2006-01-05 15:41 ` Lennart Borgman @ 2006-01-05 20:44 ` Eli Zaretskii 2006-01-05 21:18 ` Peter Dyballa 1 sibling, 1 reply; 21+ messages in thread From: Eli Zaretskii @ 2006-01-05 20:44 UTC (permalink / raw) > From: Peter Dyballa <Peter_Dyballa@web.de> > Date: Thu, 5 Jan 2006 14:01:10 +0100 > Cc: help-gnu-emacs@gnu.org > > The problem is encoding of the PostScript fonts used to set the > document. ps-print.el uses ISO 8859-1, independent from the buffer > contents' encoding. I don't think this is true. First, there's ps-mule.el that can be set up to use other 8-bit encodings instead of 8859-1, if your printer has the appropriate fonts loaded. And second, you can install BDF fonts for other character sets and set up ps-mule and ps-print for printing almost any character set imaginable. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-05 20:44 ` Eli Zaretskii @ 2006-01-05 21:18 ` Peter Dyballa 2006-01-06 8:36 ` Eli Zaretskii 0 siblings, 1 reply; 21+ messages in thread From: Peter Dyballa @ 2006-01-05 21:18 UTC (permalink / raw) Cc: help-gnu-emacs Am 05.01.2006 um 21:44 schrieb Eli Zaretskii: >> The problem is encoding of the PostScript fonts used to set the >> document. ps-print.el uses ISO 8859-1, independent from the buffer >> contents' encoding. > > I don't think this is true. First, there's ps-mule.el that can be set > up to use other 8-bit encodings instead of 8859-1, if your printer has > the appropriate fonts loaded. And second, you can install BDF fonts > for other character sets and set up ps-mule and ps-print for printing > almost any character set imaginable. I don't want to print bitmaps. I have a genuine PostScript 3 printer. -- Greetings Pete These are my principles and if you don't like them... well, I have others. - Groucho Marx ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-05 21:18 ` Peter Dyballa @ 2006-01-06 8:36 ` Eli Zaretskii 2006-01-06 11:59 ` Peter Dyballa 2006-01-10 17:37 ` PostScript printing Latin-N (with N != 1) (was: Printing from WindowXP version of emacs) Reiner Steib 0 siblings, 2 replies; 21+ messages in thread From: Eli Zaretskii @ 2006-01-06 8:36 UTC (permalink / raw) > Cc: help-gnu-emacs@gnu.org > From: Peter Dyballa <Peter_Dyballa@Web.DE> > Date: Thu, 5 Jan 2006 22:18:42 +0100 > > Am 05.01.2006 um 21:44 schrieb Eli Zaretskii: > > >> The problem is encoding of the PostScript fonts used to set the > >> document. ps-print.el uses ISO 8859-1, independent from the buffer > >> contents' encoding. > > > > I don't think this is true. First, there's ps-mule.el that can be set > > up to use other 8-bit encodings instead of 8859-1, if your printer has > > the appropriate fonts loaded. And second, you can install BDF fonts > > for other character sets and set up ps-mule and ps-print for printing > > almost any character set imaginable. > > I don't want to print bitmaps. I have a genuine PostScript 3 printer. ``Don't want'' and ``doesn't work'' are two different things, you know. Your message to which I replied made it sound like Emacs PostScript printing is broken for anything but Latin-1. Which is clearly not true. All one needs is download and install the GNU Intlfonts package and customize a few variables as documented in ps-mule.el. In addition to BDF fonts, there are Type1 and TrueType fonts in that package. Also, if you set up ps-mule.el to use non-ASCII fonts supported by your printer, the printouts you will get will be as pretty as pure ASCII, the fonts from Intlfonts are only used for characters not covered by the printer's built-in fonts. As for bitmaps, back when I looked into this, work was being done on writing ps-type1.el which, like ps-bdf.el for BDF, was supposed to let ps-print use Type1 fonts. I don't know if this work was finished, but if it wasn't, I'd suggest that people who are interested in enhancing Emacs printing capabilities to work on Type1 and TrueType fonts, instead of preaching that we delegate printing to IE. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-06 8:36 ` Eli Zaretskii @ 2006-01-06 11:59 ` Peter Dyballa 2006-01-06 14:07 ` Eli Zaretskii 2006-01-10 17:37 ` PostScript printing Latin-N (with N != 1) (was: Printing from WindowXP version of emacs) Reiner Steib 1 sibling, 1 reply; 21+ messages in thread From: Peter Dyballa @ 2006-01-06 11:59 UTC (permalink / raw) Cc: help-gnu-emacs Am 06.01.2006 um 09:36 schrieb Eli Zaretskii: > All one needs is download and install the GNU > Intlfonts package and customize a few variables as documented in > ps-mule.el. In addition to BDF fonts, there are Type1 and TrueType > fonts in that package. These fonts are a mess of patches with holes in them. I do not recommend to use them, except, one uses found rubber parts instead of tyres around one's car's rims because the tyres were needed to build one's shoes, sandal type, from. The PS or TT fonts come from the old TeX Omega project. In recent TeX you can find more and more complete fonts (meanwhile we are writing the year 2006, it's in the third millennium now). And I know what I am writing since I have them installed, since I use them still in some Carbon Emacsen (some variants are handicapped from inadequate and proprietary decisions in last millennium), since I used them in GNU Emacs 22 which now has a basis of complicated fontsets from mostly mono-spaced Unicode encoded TrueType fonts -- from time to time I still see glyphs from the GNU Intlfonts! Fighting with these fontset definitions brings much more pleasing results than using this given up and incomplete work-around. There is probably good reason that ps-type1.el is not included in GNU Emacs. And I am sure this decision is not based on the existence of htmlize.el. Which looks more like a perfect work-around for something missing in GNU Emacs, or, in other words, like a solution for a since long existing problem. -- Greetings Pete To be is to do. -- I. Kant To do is to be. -- A. Sartre Yabba-Dabba-Doo! -- F. Flintstone ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Printing from WindowXP version of emacs 2006-01-06 11:59 ` Peter Dyballa @ 2006-01-06 14:07 ` Eli Zaretskii 0 siblings, 0 replies; 21+ messages in thread From: Eli Zaretskii @ 2006-01-06 14:07 UTC (permalink / raw) > Cc: help-gnu-emacs@gnu.org > From: Peter Dyballa <Peter_Dyballa@Web.DE> > Date: Fri, 6 Jan 2006 12:59:28 +0100 > > > Am 06.01.2006 um 09:36 schrieb Eli Zaretskii: > > > All one needs is download and install the GNU > > Intlfonts package and customize a few variables as documented in > > ps-mule.el. In addition to BDF fonts, there are Type1 and TrueType > > fonts in that package. > > These fonts are a mess of patches with holes in them. I do not > recommend to use them, except, one uses found rubber parts instead of > tyres around one's car's rims because the tyres were needed to build > one's shoes, sandal type, from. I don't know what you are talking about. I don't maintain Intlfonts, I just used them when I needed to print text that my printer didn't support with its fonts. I got quite readable text, but perhaps I'm not as knowledgeable as you are about font design. Also note that Intlfonts were originally meant for use in display, not in ps-print. Later ps-mule and ps-bdf were added to use PostScript commands to download the fonts to the printer before printing text. In any case, the right thing to do about bad fonts that Emacs users are recommended to use is to volunteer to improve them. Until then, Intlfonts is the best collection of free fonts we know about (if you know otherwise, please suggest better alternatives, so that we could mention them in the Emacs installation instructions). > There is probably good reason that ps-type1.el is not included in GNU > Emacs. The only reason I know of is that it never got finished. > And I am sure this decision is not based on the existence of > htmlize.el. Which looks more like a perfect work-around for something > missing in GNU Emacs, or, in other words, like a solution for a since > long existing problem. Sorry, can't parse this. Perhaps my English is not good enough. ^ permalink raw reply [flat|nested] 21+ messages in thread
* PostScript printing Latin-N (with N != 1) (was: Printing from WindowXP version of emacs) 2006-01-06 8:36 ` Eli Zaretskii 2006-01-06 11:59 ` Peter Dyballa @ 2006-01-10 17:37 ` Reiner Steib 2006-01-10 19:35 ` Eli Zaretskii 1 sibling, 1 reply; 21+ messages in thread From: Reiner Steib @ 2006-01-10 17:37 UTC (permalink / raw) On Fri, Jan 06 2006, Eli Zaretskii wrote: > Your message to which I replied made it sound like Emacs PostScript > printing is broken for anything but Latin-1. Which is clearly not > true. All one needs is download and install the GNU Intlfonts > package and customize a few variables as documented in ps-mule.el. > In addition to BDF fonts, there are Type1 and TrueType fonts in that > package. I tried to setup printing from Emacs for buffers with the Euro sign (€) several times (see e.g. <http://article.gmane.org/gmane.emacs.pretest.bugs/9536>, <http://thread.gmane.org/gmane.emacs.pretest.bugs/9433>), but I failed. Following you suggestion, now I tried: --8<---------------cut here---------------start------------->8--- (require 'ps-mule) (setq ;; Pick one: ps-multibyte-buffer 'bdf-font ;; ps-multibyte-buffer 'bdf-font-except-latin bdf-directory-list '("/usr/share/fonts/bdf")) (setq rs-tmp "€uro, Umläüté, ... ÄÖÜ äöü ß ¡¿Ññ") (ps-print-buffer-with-faces "/tmp/ps-mule-bdf.ps") ;; Local Variables: ;; coding: iso-8859-15 ;; End: --8<---------------cut here---------------end--------------->8--- /usr/share/fonts/bdf$ rpm -qfi . Name : intlfonts-bdf [...] Version : 1.2.1 [...] URL : ftp://ftp.gnu.org/gnu/intlfonts/ Summary : Fonts from the GNU Intlfonts Package in BDF Format Description : Fonts from the GNU intlfonts package in the BDF format. These fonts are useful for printing exotic languages such as Thai, Tibetan, Vietnamese, Arabic, and more from within Emacs. [...] /usr/share/fonts/bdf$ ls thai24.bdf grk24-etl.bdf gulim24.bdf ethio24f-uni.bdf lt5-24-etl.bdf cyr24-etl.bdf gb24st.bdf cns6-40.bdf lt4-24-etl.bdf 12x24rk.bdf cns2-40.bdf cns5-40.bdf lt3-24-etl.bdf visc24-etl.bdf cns1-40.bdf cns4-40.bdf lt2-24-etl.bdf taipei24.bdf arab24-2-etl.bdf cns3-40.bdf lt1-24-etl.bdf sish24-etl.bdf arab24-1-etl.bdf ind24-mule.bdf lt1-16i-etl.bdf lao24-mule.bdf arab24-0-etl.bdf cns7-40.bdf lt1-16bi-etl.bdf jksp40.bdf tib24-mule.bdf fonts.cache-1 lt1-16b-etl.bdf jiskan24.bdf tib1c24-mule.bdf heb24-etl.bdf ipa24-etl.bdf ind1c24-mule.bdf ~$ emacs-cvs -Q /tmp/print-test.el [ emacs-cvs is thee CVS trunk of today. ] `M-x eval-buffer RET' gives "Font for some characters not found, continue anyway? (y or n) " and the following warning buffer: ,---- | These characters in the buffer can't be printed: | € | Click them to jump to the buffer position, | or C-u C-x = will give information about them. `---- `C-u C-x =' says: character: € (3876, #o7444, #xf24, U+20AC) charset: latin-iso8859-15 (The same with `ps-multibyte-buffer' to 'bdf-font or 'bdf-font-except-latin) When setting `ps-multibyte-buffer' to 'bdf-font-except-latin, I get a hollow square instead of the € in the PS file. When setting `ps-multibyte-buffer' to 'bdf-font, the gs can't display the PS file: ~$ gs /tmp/ps-mule-bdf.ps ESP Ghostscript 7.07 (2003-07-12) Copyright 2003 artofcode LLC and Easy Software Products, all rights reserved. This software comes with NO WARRANTY: see the file COPYING for details. Loading NimbusMonL-Regu font from /usr/share/ghostscript/fonts/n022003l.pfb... 2767592 1340734 1713912 416094 0 done. Loading NimbusSanL-Bold font from /usr/share/ghostscript/fonts/n019004l.pfb... 2924672 1472136 1829848 515847 0 done. Loading NimbusSanL-Regu font from /usr/share/ghostscript/fonts/n019003l.pfb... 3032232 1519010 1805088 437391 0 done. Loading NimbusRomNo9L-ReguItal font from /usr/share/ghostscript/fonts/n021023l.pfb... 3196080 1687052 1829848 452324 0 done. Loading NimbusMonL-Bold font from /usr/share/ghostscript/fonts/n022004l.pfb... 3377920 1853484 1854608 450687 0 done. Loading NimbusMonL-ReguObli font from /usr/share/ghostscript/fonts/n022023l.pfb... 3535000 1998269 1854608 452887 0 done. Loading NimbusMonL-BoldObli font from /usr/share/ghostscript/fonts/n022024l.pfb... 3716840 2167266 1854608 463469 0 done. Unrecoverable error: typecheck in aload Operand stack: SpaceWidth --nostringval-- Unexpected interpreter error -20. Error object: (f80)op(560:aload)0x48e9e0 Operand stack at 0xeeb708: 0xed44c8: 0x0d name --S------ 0x1353 0x0102ca98 = SpaceWidth 0xed44d8: 0x0e null --F------ 0x00ea 0x00000001 Execution stack at 0xeeb6a0: 0xed7798: 0x0f oper --F---e-- 0x0000 0x00483040 = %interp_exit 0xed77a8: 0x0d name --S---e-- 0x0302 0x00f34258 = .runexec2 0xed77b8: 0x03 file --G-rx--- 0x0001 0x0109cdb8 0xed77c8: 0x05 mpry --G-rxe-- 0x0006 0x00f3af32 0xed77d8: 0x0e null --F---e-- 0x0003 0x0048f040 0xed77e8: 0x0e null --F------ 0x00ea 0x00000001 0xed77f8: 0x0b int --F------ 0x0000 0x00000002 = 2 0xed7808: 0x0f oper --F---e-- 0x0000 0x0048efe0 = %stopped_push 0xed7818: 0x03 file --G-rxe-- 0x0001 0x0109cdb8 0xed7828: 0x05 mpry --G-rxe-- 0x0002 0x00f3bc08 0xed7838: 0x06 spry --G-rxe-- 0x0002 0x00f3bbaa 0xed7848: 0x04 arry --L-rxe-- 0x0004 0x010a8978 0xed7858: 0x04 arry --L-rxe-- 0x000a 0x010a8828 0xed7868: 0x04 arry --L-rxe-- 0x0004 0x010a84a8 0xed7878: 0x04 arry --L-rxe-- 0x0003 0x010a82c8 0xed7888: 0x05 mpry --G-rxe-- 0x0039 0x00f3c352 Dictionary stack at 0xeeb608: 0xeeb0d8: 0x02 dict --Gwrx--- 0x0000 0x00eb5ec8 0xeeb0e8: 0x02 dict --Gwrx--- 0x0000 0x00f5e9e8 0xeeb0f8: 0x02 dict --Lwrx--- 0x0000 0x00ecf3a8 0xeeb108: 0x02 dict --Gwrx--- 0x0000 0x00eb5ec8 0xeeb118: 0x02 dict --Lwrx--- 0x0000 0x00ed06c8 0xeeb128: 0x02 dict --Lwrx--- 0x0000 0x010a89d8 Bye, Reiner. \f -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: PostScript printing Latin-N (with N != 1) (was: Printing from WindowXP version of emacs) 2006-01-10 17:37 ` PostScript printing Latin-N (with N != 1) (was: Printing from WindowXP version of emacs) Reiner Steib @ 2006-01-10 19:35 ` Eli Zaretskii 2006-01-11 15:55 ` PostScript printing Latin-N (with N != 1) Reiner Steib 0 siblings, 1 reply; 21+ messages in thread From: Eli Zaretskii @ 2006-01-10 19:35 UTC (permalink / raw) > From: Reiner Steib <reinersteib+gmane@imap.cc> > Date: Tue, 10 Jan 2006 18:37:54 +0100 > > /usr/share/fonts/bdf$ ls > thai24.bdf grk24-etl.bdf gulim24.bdf ethio24f-uni.bdf > lt5-24-etl.bdf cyr24-etl.bdf gb24st.bdf cns6-40.bdf > lt4-24-etl.bdf 12x24rk.bdf cns2-40.bdf cns5-40.bdf > lt3-24-etl.bdf visc24-etl.bdf cns1-40.bdf cns4-40.bdf > lt2-24-etl.bdf taipei24.bdf arab24-2-etl.bdf cns3-40.bdf > lt1-24-etl.bdf sish24-etl.bdf arab24-1-etl.bdf ind24-mule.bdf > lt1-16i-etl.bdf lao24-mule.bdf arab24-0-etl.bdf cns7-40.bdf > lt1-16bi-etl.bdf jksp40.bdf tib24-mule.bdf fonts.cache-1 > lt1-16b-etl.bdf jiskan24.bdf tib1c24-mule.bdf > heb24-etl.bdf ipa24-etl.bdf ind1c24-mule.bdf Does any of these fonts support Latin-9? If not, that's the reason for the empty box instead of the Euro. Also, the font database in ps-mule-font-info-database-bdf seems like the font for Latin-9 characters is not set. Alternatively, if you can find a BDF Latin-9 font and install it, your text should print okay. > (The same with `ps-multibyte-buffer' to 'bdf-font or > 'bdf-font-except-latin) This isn't supposed to work: 'bdf-font-except-latin is for Latin-1 characters, not for Latin-9. But if your printer has Latin-9 fonts, you could use 'bdf-font-except-latin if you modify ps-mule-font-info-database-latin to handle Latin-9 instead of Latin-1. Anyway, the original issue was this: > On Fri, Jan 06 2006, Eli Zaretskii wrote: > > > Your message to which I replied made it sound like Emacs PostScript > > printing is broken for anything but Latin-1. Which is clearly not > > true. All one needs is download and install the GNU Intlfonts > > package and customize a few variables as documented in ps-mule.el. So, even if Latin-9 is not supported because Intlfonts doesn't have a font for it, it doesn't mean only Latin-1 is supported. Try printing Latin-2, Latin-3, Cyrillic, Thai, Japanese, etc. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: PostScript printing Latin-N (with N != 1) 2006-01-10 19:35 ` Eli Zaretskii @ 2006-01-11 15:55 ` Reiner Steib 2006-01-11 19:59 ` Eli Zaretskii 2006-01-11 21:55 ` Peter Dyballa 0 siblings, 2 replies; 21+ messages in thread From: Reiner Steib @ 2006-01-11 15:55 UTC (permalink / raw) On Tue, Jan 10 2006, Eli Zaretskii wrote: >> /usr/share/fonts/bdf$ ls [...] > Does any of these fonts support Latin-9? If not, that's the reason > for the empty box instead of the Euro. I don't know. Probably not, as you message on emacs-devel suggests. > But if your printer has Latin-9 fonts, you could use > 'bdf-font-except-latin if you modify > ps-mule-font-info-database-latin to handle Latin-9 instead of > Latin-1. With the patch and setup suggested by Kenichi Handa I was able to print Latin-9 but it was wrong for Latin-1. (see my previous message: <http://article.gmane.org/gmane.emacs.pretest.bugs/9536>) Maybe Emacs could do something similar to GNU enscript. Printing my sample file with "enscript --encoding=latin9" (and latin1) works there: gs is able to display the correct glyphs. (Since most end-users don't have real PostScript printers, it should be possible to render the output with gs as most print systems on GNU/Linux use it, AFAIK.) > Anyway, the original issue was this: > >> On Fri, Jan 06 2006, Eli Zaretskii wrote: >> >> > Your message to which I replied made it sound like Emacs PostScript >> > printing is broken for anything but Latin-1. Which is clearly not >> > true. All one needs is download and install the GNU Intlfonts >> > package and customize a few variables as documented in ps-mule.el. > > So, even if Latin-9 is not supported because Intlfonts doesn't have a > font for it, it doesn't mean only Latin-1 is supported. I didn't claim that it doesn't work for anything else but Latin-1. I only tested the most important encoding beyond Latin-1 for my region which is Latin-9 because of the Euro sign. > Try printing Latin-2, Latin-3, Cyrillic, Thai, Japanese, etc. Printing the same file (with the €uro) encoded in UTF-8 fails with: "bdf-read-font-info: BDF file etl24-unicode.bdf doesn't exist" Printing the Thai example text from HELLO produces a PS file, but gs can't display the PS file (as in my previous mail): Unrecoverable error: typecheck in aload Operand stack: SpaceWidth --nostringval-- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: PostScript printing Latin-N (with N != 1) 2006-01-11 15:55 ` PostScript printing Latin-N (with N != 1) Reiner Steib @ 2006-01-11 19:59 ` Eli Zaretskii 2006-01-12 20:35 ` Reiner Steib 2006-01-11 21:55 ` Peter Dyballa 1 sibling, 1 reply; 21+ messages in thread From: Eli Zaretskii @ 2006-01-11 19:59 UTC (permalink / raw) > From: Reiner Steib <reinersteib+gmane@imap.cc> > Date: Wed, 11 Jan 2006 16:55:15 +0100 > > With the patch and setup suggested by Kenichi Handa I was able to > print Latin-9 but it was wrong for Latin-1. Emacs 21 and 22 doesn't support Latin-1 and Latin-9 in the same character set. > Printing the same file (with the Euro) encoded in UTF-8 fails with: > "bdf-read-font-info: BDF file etl24-unicode.bdf doesn't exist" Well, it's quite clear what it tells you, yes? > Printing the Thai example text from HELLO produces a PS file, but gs > can't display the PS file (as in my previous mail): So gs also has problems, or so it seems. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: PostScript printing Latin-N (with N != 1) 2006-01-11 19:59 ` Eli Zaretskii @ 2006-01-12 20:35 ` Reiner Steib 2006-01-13 8:10 ` Eli Zaretskii 0 siblings, 1 reply; 21+ messages in thread From: Reiner Steib @ 2006-01-12 20:35 UTC (permalink / raw) On Wed, Jan 11 2006, Eli Zaretskii wrote: >> From: Reiner Steib <reinersteib+gmane@imap.cc> >> Date: Wed, 11 Jan 2006 16:55:15 +0100 >> >> With the patch and setup suggested by Kenichi Handa I was able to >> print Latin-9 but it was wrong for Latin-1. > > Emacs 21 and 22 doesn't support Latin-1 and Latin-9 in the same > character set. I meant two different buffers. One containing _only_ Latin-1, the other _only_ Latin-9 characters. >> Printing the same file (with the Euro) encoded in UTF-8 fails with: >> "bdf-read-font-info: BDF file etl24-unicode.bdf doesn't exist" > > Well, it's quite clear what it tells you, yes? Sure, but I couldn't find this file neither in SuSE 9.2 or 10.0 nor on a Debian GNU/Linux box. Unless most of the major GNU/Linux distributions include the required BDF fonts, using `bdf-font' is not a feasible solution for end users. >> Printing the Thai example text from HELLO produces a PS file, but gs >> can't display the PS file (as in my previous mail): > > So gs also has problems, or so it seems. Possible. Or the created PS file is invalid. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: PostScript printing Latin-N (with N != 1) 2006-01-12 20:35 ` Reiner Steib @ 2006-01-13 8:10 ` Eli Zaretskii 2006-01-13 17:09 ` Reiner Steib 0 siblings, 1 reply; 21+ messages in thread From: Eli Zaretskii @ 2006-01-13 8:10 UTC (permalink / raw) > From: Reiner Steib <reinersteib+gmane@imap.cc> > Date: Thu, 12 Jan 2006 21:35:31 +0100 > > On Wed, Jan 11 2006, Eli Zaretskii wrote: > > >> From: Reiner Steib <reinersteib+gmane@imap.cc> > >> Date: Wed, 11 Jan 2006 16:55:15 +0100 > >> > >> With the patch and setup suggested by Kenichi Handa I was able to > >> print Latin-9 but it was wrong for Latin-1. > > > > Emacs 21 and 22 doesn't support Latin-1 and Latin-9 in the same > > character set. > > I meant two different buffers. One containing _only_ Latin-1, the > other _only_ Latin-9 characters. In that case, it might be something in how you set up the ps-mule database. Perhaps it doesn't support more than one Latin-n set, I never tried to do something like that myself, I only ever set it for a single Latin character set. > >> Printing the same file (with the Euro) encoded in UTF-8 fails with: > >> "bdf-read-font-info: BDF file etl24-unicode.bdf doesn't exist" > > > > Well, it's quite clear what it tells you, yes? > > Sure, but I couldn't find this file neither in SuSE 9.2 or 10.0 nor on > a Debian GNU/Linux box. Unless most of the major GNU/Linux > distributions include the required BDF fonts, using `bdf-font' is not > a feasible solution for end users. Here again you are too eager to generalize, I think: a single font is missing, and already this is ``not a feasible solution''. Given that the current Emacs doesn't even support Unicode reasonably enough, isn't it a tad too much to reject a package that covers most other character sets? > >> Printing the Thai example text from HELLO produces a PS file, but gs > >> can't display the PS file (as in my previous mail): > > > > So gs also has problems, or so it seems. > > Possible. Or the created PS file is invalid. I have a PostScript printer. If you really want to know which one of these possibilities is true, send me the PS file and I will look. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: PostScript printing Latin-N (with N != 1) 2006-01-13 8:10 ` Eli Zaretskii @ 2006-01-13 17:09 ` Reiner Steib 0 siblings, 0 replies; 21+ messages in thread From: Reiner Steib @ 2006-01-13 17:09 UTC (permalink / raw) On Fri, Jan 13 2006, Eli Zaretskii wrote: >> From: Reiner Steib <reinersteib+gmane@imap.cc> [...] >> I meant two different buffers. One containing _only_ Latin-1, the >> other _only_ Latin-9 characters. > > In that case, it might be something in how you set up the ps-mule > database. Perhaps it doesn't support more than one Latin-n set, I > never tried to do something like that myself, I only ever set it for a > single Latin character set. I just tried what Handa suggested. (See the URL I gave.) >> >> Printing the same file (with the Euro) encoded in UTF-8 fails with: >> >> "bdf-read-font-info: BDF file etl24-unicode.bdf doesn't exist" >> > >> > Well, it's quite clear what it tells you, yes? >> >> Sure, but I couldn't find this file neither in SuSE 9.2 or 10.0 nor on >> a Debian GNU/Linux box. Unless most of the major GNU/Linux >> distributions include the required BDF fonts, using `bdf-font' is not >> a feasible solution for end users. > > Here again you are too eager to generalize, I think: a single font is > missing, and already this is ``not a feasible solution''. Given that > the current Emacs doesn't even support Unicode reasonably enough, Do you mean Emacs 21 or Emacs 22? > isn't it a tad too much to reject a package that covers most other > character sets? Eli, I don't reject the package. I don't have any reason not to trust you when you say that it works for most languages. I don't want to generalize, I'm only saying that it doesn't work for me in the very specific test cases that I have tried. Personally, I don't mind if I get a hollow square instead or I'll use enscript or something else if I really want to see glyph. I'm thinking of users who will (once Emacs 22 is released) ask questions like "How do I print text files containing the €uro sign in Emacs?". Telling the user to install the "intlfonts-bdf" package an set a few is okay. But I can't find "etl24-unicode.bdf" (nor a BDF font for Latin-9) neither in GNU/Linux distributions nor with Google. IMHO, most user would give up already if it doesn't work out-of-the-box. Or they will go for workaround like htmlize.el + printing from the browser. >> >> Printing the Thai example text from HELLO produces a PS file, but gs >> >> can't display the PS file (as in my previous mail): >> > >> > So gs also has problems, or so it seems. >> >> Possible. Or the created PS file is invalid. > > I have a PostScript printer. If you really want to know which one of > these possibilities is true, send me the PS file and I will look. Sending it to a HP 4100 PostScript Printer (with "lpr -oraw") results in no output on the printer (the display switches to "Processing job" for a moment). Printing a simple plain text with "lpr -oraw" works. Here is the text file including the setup starting from "emacs -Q": http://theotp1.physik.uni-ulm.de/~ste/comp/emacs/misc/Thai-From-HELLO.gz Here's the PostScript file: http://theotp1.physik.uni-ulm.de/~ste/comp/emacs/misc/ps-mule-bdf-Thai-From-HELLO.ps.gz (gzipped to avoid possible corruption) (I can also send them to you by mail if you don't have web access.) Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: PostScript printing Latin-N (with N != 1) 2006-01-11 15:55 ` PostScript printing Latin-N (with N != 1) Reiner Steib 2006-01-11 19:59 ` Eli Zaretskii @ 2006-01-11 21:55 ` Peter Dyballa 1 sibling, 0 replies; 21+ messages in thread From: Peter Dyballa @ 2006-01-11 21:55 UTC (permalink / raw) Cc: help-gnu-emacs Am 11.01.2006 um 16:55 schrieb Reiner Steib: > Maybe Emacs could do something similar to GNU enscript. Printing my > sample file with "enscript --encoding=latin9" Heh, since when is enscript supporting ISO Latin-9?! My "GNU enscript 1.6.1" provides no 88599.enc encoding file ... -- Mit friedvollen Grüßen Pete Basic, n.: A programming language. Related to certain social diseases in that those who have it will not admit it in polite company. ^ permalink raw reply [flat|nested] 21+ messages in thread
* translation software (was: Printing from WindowXP version of emacs) 2006-01-05 1:56 ` BRUCE INGALLS 2006-01-05 13:01 ` Peter Dyballa @ 2006-01-05 16:05 ` Reiner Steib 1 sibling, 0 replies; 21+ messages in thread From: Reiner Steib @ 2006-01-05 16:05 UTC (permalink / raw) On Thu, Jan 05 2006, BRUCE INGALLS wrote: > On 1/4/06, Peter Dyballa <Peter_Dyballa@web.de> wrote: [ http://EMacro.sf.net/ ] >> Your site in German is quite funny > > Perhaps I should leave everything in English, but I am trying to > accomodate the rest of the world. Please leave it in English until you find a human translator. The current "German" version just nonsense. The "German" text doesn't contain a single intelligible sentence. Additional `C-x = cut' becomes `C-x = Schnitt', etc. User who have set their language preferences to "German, English" will get the nonsense instead of the English version. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2006-01-13 17:09 UTC | newest] Thread overview: 21+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-01-04 0:34 Printing from WindowXP version of emacs BRUCE INGALLS 2006-01-04 10:00 ` Peter Dyballa 2006-01-05 1:56 ` BRUCE INGALLS 2006-01-05 13:01 ` Peter Dyballa 2006-01-05 15:41 ` Lennart Borgman 2006-01-05 21:17 ` Peter Dyballa 2006-01-06 8:39 ` Eli Zaretskii 2006-01-05 20:44 ` Eli Zaretskii 2006-01-05 21:18 ` Peter Dyballa 2006-01-06 8:36 ` Eli Zaretskii 2006-01-06 11:59 ` Peter Dyballa 2006-01-06 14:07 ` Eli Zaretskii 2006-01-10 17:37 ` PostScript printing Latin-N (with N != 1) (was: Printing from WindowXP version of emacs) Reiner Steib 2006-01-10 19:35 ` Eli Zaretskii 2006-01-11 15:55 ` PostScript printing Latin-N (with N != 1) Reiner Steib 2006-01-11 19:59 ` Eli Zaretskii 2006-01-12 20:35 ` Reiner Steib 2006-01-13 8:10 ` Eli Zaretskii 2006-01-13 17:09 ` Reiner Steib 2006-01-11 21:55 ` Peter Dyballa 2006-01-05 16:05 ` translation software (was: Printing from WindowXP version of emacs) Reiner Steib
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.