![]() |
|||||||||||||||||||
|
|
What you needTo use the program you only need a TTF font file with the characters you want to print and the postscript output from Mozilla, Galeon, Netscape, HtmlDoc. To find free TTF fonts for you character set or language you can check out this site: Dr Berlin's Foreign Font Archive To build from source you need the freetype library which you can find already packed for your distribution or here: FreeType Homepage. Both freetype (freetype1) and freetype2 are now supported. To test the build or the program itself you now have a test script in the distribution. Read the README and the README.test. To further check the program you might want to go to the Debian Homepage and select a language from the list at the bottom of the page. See what encoding it is using by going to "Edit" and then "View Page Info" (in Mozilla/Netscape) and print it to a file. Be sure to specify the correct encoding and font to wprint. You can view the postprocessed file with ghostscript or print it. Pages can be printed correctly even if the system lacks the X fonts to show the page properly, although the positioning done by the browser will not be as good. Building the programJust run './configure' from the source directory, that will create a Makefile for your system. Then type 'make'. If everything goes right you might want to test the program before you install it, go to the doc/test directory and run test.sh (you might have to change the permisions or do '. test.sh'). Please read the file README.test. Once you tested the program you can do 'make install' to install it on your system If the above does not work you can also edit the Makefile to point to freetype and iconv (and whatever else is necessary) and then type 'make' and follow the same procedure as above. If you still cannot build the program you might want to write to me, I will try to help you out. Running the programWhen you print from Mozilla/Netscape you have to type the print command in the print dialog box. That is usually something like 'lpr -P myprinter'. Mozilla/Netscape--->'lpr -P myprinter'--->myprinterFrom now on Mozilla/Netscape will send their output to wprint which in turn (after processing) is going to send its output to the printer or a file using a print command that is specified in the last part of each configuration entry. Mozilla/Netscape--->wprint -l entry--->'lpr -P myprinter'--->myprinterNote that there might be other filters involved between 'lpr' and the printer but that does not concern wprint. In order to get wprint to work you just have to type 'wprint' as your printing command for the default entry, for the other you will have to type 'wprint -l name_of_entry'. See the same wprint.conf entry 'default' and change the printing command to suit your system. It might be a good idea to print like that first. Check the provided wprint.conf file, it is documented and will give you a good idea on how to set up the font conversions for the program to work. All my entries are there, using the font cyberbit.ttf, and I use them regularly to print unicode text. You can also run wprint from the command line, to process a file saved by choosing 'print to a file' in the Mozilla/Netscape dialog. wprint -p filename.ps -i encoding -f font_list -v -x -c conffile -l entry
for example, the test program runs: wprint -i UTF-8 -p netscape.ps -f courier-8859_3=ISO_8859-3 > test1.ps wprint -c wprint-test.conf -p netscape.ps Both lines achieve the same things, the first one with every option in the command line and the second one using a configuration file. If the configuration file had been /etc/wprint.conf then just 'wprint -p netscape.ps' would have been enough. The output of the program when there is no configuration file is stdout, so you can pipe it to whatever you want. I recommend that instead of printing right away to a printer you do it to a file first and check the result with, for example, ghostscript to see if you have your fonts set up properly. You will help save a bit of the world's forest by running your tests this way :). About font order and font substitutionThe order of fonts in this case is very important since the fonts Netscape uses are going to be replaced in the same order. If you specify fewer fonts then the last ones are going to be replaced by the last font you listed.
Important NotesFor BIG5 pages Netscape generates EUC-TW output, so you should use EUC-TW each time you are dealing with BIG5 in the config files. In a similiar way, for SHIFT-JIS Japanese pages, Netscape generates EUCJP output. (thanks to Alex Madon <madon at cma-it dot com>) Netscape does all the positioning so that if your font does not scale well to the size Netscape wants it to use there is very little the filter can do at this moment. You can try to use the xy, yr and pt parameters to change the resolution and pointsize of the characters to be created. If you have any suggestions or corrections to the program don't hesitate to write to me to etrapani@unesco.org.uy wprint.conf
# The format of this file is |
||||||||||||||||||