[go: up one dir, main page]

Menu

Tree [72b583] master / tests / c /
 History

HTTPS access


File Date Author Commit
 cmake 2007-10-30 U. Steinmann U. Steinmann [47caa2] - added code to search for pslib
 .cvsignore 2007-07-12 U. Steinmann U. Steinmann [7de031] - ignore more files
 AlteSchwabacher.afm 2004-03-19 U. Steinmann U. Steinmann [2d9cf5] - Added all fonts which are used in the examples
 AlteSchwabacher.enc 2004-06-15 U. Steinmann U. Steinmann [04fa84] - fixed ligatures and modified encoding vector ...
 AlteSchwabacher.pfb 2004-03-19 U. Steinmann U. Steinmann [2d9cf5] - Added all fonts which are used in the examples
 CMakeLists.txt 2011-03-28 U. Steinmann U. Steinmann [f7cc03] - added line cmake_minimum_required
 ChangeLog 2007-07-12 U. Steinmann U. Steinmann [522b40] - completed list of new examples
 Courier.afm 2005-04-07 U. Steinmann U. Steinmann [836df7] - Courier.afm was missing in pagehook example
 Helvetica-Bold.afm 2007-06-23 U. Steinmann U. Steinmann [094463] - poster.c uses Helvetica-Bold
 Helvetica.afm 2004-03-19 U. Steinmann U. Steinmann [2d9cf5] - Added all fonts which are used in the examples
 Helvetica.pro 2004-03-19 U. Steinmann U. Steinmann [2d9cf5] - Added all fonts which are used in the examples
 Makefile.unix 2019-11-02 Uwe Steinmann Uwe Steinmann [da1f82] new version 0.0.11
 README 2011-04-01 U. Steinmann U. Steinmann [a2f603] - added new example imagereuse.c
 cmyk.c 2007-07-05 U. Steinmann U. Steinmann [29c757] - remove unneeded header files because Visual C...
 cne-cmyk.jpg 2005-07-21 U. Steinmann U. Steinmann [c64aed] - use cne-cmyk.jpg instead of cytanet_cmyk.jpg
 cork.enc 2004-09-14 U. Steinmann U. Steinmann [32c208] - encoding vector according to core
 debian-transparent.gif 2007-06-22 U. Steinmann U. Steinmann [e3118c] - new image used in image.c
 debian.bmp 2006-04-23 U. Steinmann U. Steinmann [db219d] - added new example for bmp images
 debian.gif 2006-04-20 U. Steinmann U. Steinmann [b62d60] - added images for new examples in image.c
 debian.png 2004-02-03 U. Steinmann U. Steinmann [756c8b] - Added example how to include png and eps images
 debian.tiff 2006-04-21 U. Steinmann U. Steinmann [012390] - added missing file for tiff example
 dice.afm 2004-03-19 U. Steinmann U. Steinmann [2d9cf5] - Added all fonts which are used in the examples
 dice.pfb 2004-03-19 U. Steinmann U. Steinmann [2d9cf5] - Added all fonts which are used in the examples
 draw.c 2007-07-05 U. Steinmann U. Steinmann [f953fa] - fixed many compiler errors when using Visual C
 einstein.c 2011-04-01 U. Steinmann U. Steinmann [e6e971] - memory debugging can turned on/off
 einstein.txt 2004-06-07 U. Steinmann U. Steinmann [b46087] - Removed some text which didn't fit
 exiftest.jpg 2005-04-07 U. Steinmann U. Steinmann [160142] - image needed by draw.c
 fontcreate.c 2007-07-05 U. Steinmann U. Steinmann [29c757] - remove unneeded header files because Visual C...
 fontsample.c 2007-07-03 U. Steinmann U. Steinmann [52d281] - use sample font when calling PS_symbol_width()
 glyphlist.c 2007-07-11 U. Steinmann U. Steinmann [be3b61] - sort list of glyph names
 gnu-head.jpg 2005-04-15 U. Steinmann U. Steinmann [c4fe58] - new example with gray scale jpeg
 hyperlinks.c 2004-06-29 U. Steinmann U. Steinmann [041e92] - added PS_boot() and PS_shutdown() where missing
 hyph_de.dic 2004-03-19 U. Steinmann U. Steinmann [637c27] - dictionaries for hyphenation
 hyph_en.dic 2004-03-19 U. Steinmann U. Steinmann [637c27] - dictionaries for hyphenation
 hyphenate.c 2007-06-27 U. Steinmann U. Steinmann [744edc] - do not include <libintl.h>
 image.c 2007-07-05 U. Steinmann U. Steinmann [29c757] - remove unneeded header files because Visual C...
 imagereuse.c 2011-04-01 U. Steinmann U. Steinmann [103d85] - small corrections
 indexed-alpha.png 2004-09-14 U. Steinmann U. Steinmann [b35adc] - image for the image.c example
 indexed.png 2004-09-14 U. Steinmann U. Steinmann [b35adc] - image for the image.c example
 interlaced.gif 2006-04-20 U. Steinmann U. Steinmann [b62d60] - added images for new examples in image.c
 ligatures.c 2011-03-28 U. Steinmann U. Steinmann [abaf50] ???
 ligexperts.c 2007-07-12 U. Steinmann U. Steinmann [349c7f] - fixed Visual C++ compile errors
 logos.c 2007-07-12 U. Steinmann U. Steinmann [b6a1ee] - fixed compile with MS Visual C
 memory.c 2007-07-05 U. Steinmann U. Steinmann [740b21] - do not include unistd.h
 mmk.c 2007-07-05 U. Steinmann U. Steinmann [29c757] - remove unneeded header files because Visual C...
 overprint.c 2007-07-05 U. Steinmann U. Steinmann [29c757] - remove unneeded header files because Visual C...
 pagehook.c 2007-07-05 U. Steinmann U. Steinmann [29c757] - remove unneeded header files because Visual C...
 picture.eps 2004-03-19 U. Steinmann U. Steinmann [336b70] - renamed file
 picture.fig 2004-03-19 U. Steinmann U. Steinmann [1c85f1] - xfig source for test eps
 polish.c 2007-07-12 U. Steinmann U. Steinmann [1d65d5] - demonstrate use of latin2
 poster.c 2019-11-02 Uwe Steinmann Uwe Steinmann [2cbd89] add missing tests
 psclock.c 2007-07-12 U. Steinmann U. Steinmann [1e76ec] - don't call sleep on WIN32
 rgb-alpha.png 2004-09-14 U. Steinmann U. Steinmann [b35adc] - image for the image.c example
 rgb.png 2004-09-14 U. Steinmann U. Steinmann [b35adc] - image for the image.c example
 schematic.c 2007-07-03 U. Steinmann U. Steinmann [80e131] - new example for creating type3 fonts
 shading.c 2011-04-04 U. Steinmann U. Steinmann [01e107] - list unfreed memory
 showbox.c 2019-11-02 Uwe Steinmann Uwe Steinmann [2cbd89] add missing tests
 spotcolor.c 2007-07-05 U. Steinmann U. Steinmann [29c757] - remove unneeded header files because Visual C...
 txt2ps.c 2007-07-05 U. Steinmann U. Steinmann [29c757] - remove unneeded header files because Visual C...

Read Me

These are example written in C for the PostScript library pslib.

How to run the examples
=======================

Run 'make <ps file>' to create a particular PostScript file.
<ps file> is one of the example names with extension '.ps'. To run the
example 2 just type 'make psclock.ps'. Alternatively, run 'make run'
to compile an run all examples.

How to compile the examples
===========================

Just type make to compile all examples.

How to get help
===============

Type 'make help' for a list of available make targets and a short
description.

Example 1: draw.c
=================

This is the most complete example demonstrating many aspects of
pslib. It contains of many single boxes, each presenting a feature
of pslib.

Example 2. psclock.c
====================

Those who know pdflib (TM) (see http://www.pdflib.com) will probably
know this example. It draws an analog clock on a single page showing the
current time. The same example is shipped with pdflib.
If you create several hundred pages then this example can somewhat
serve as a simple benchmark. Just count the pages between two
seconds. On my rather slow PowerPC 400 MHz it easily creates more than
400 pages a second.
The number of pages can be set in the variable numpages in the C source file.

Example 3. einstein.c
=====================

This is basically a three pages text document. It was written in german
bei Albert Einstein. I uses the font Schwabacher because of its many
ligatures which is a perfect way to show some of pslib's enhanced text output
features. The font itself does not contain any ligature information.
That's why the encoding file is provided. The encoding vector itself
is not used, but the ligatures in the head of the file. The font is
also very buggy because the ligatures do not even have propper names.
They are randomly placed all over the font replacing other glyphs.
This explains the strange names of the ligatures in the encoding file.
The text is set in two columns using hyphenation. Paragraphs are
separated by a carrige return on a single line. The first line of
a paragraph is indented. Paragraphs are also separated with extra
space.

Example 4. hyperlinks.c
=======================

pslib supports pdfmarks which allows to place code into the PostScript
document which is disregarded by the printer but will be evaluated by
Acrobat Distiller (TM) or Ghostscript when it is converted to PDF.
Such pdfmarks can preserve features only supported by PDF in a PostScript
document. This example is a two page document. The pages have different
size and both have a bookmark. Page one contains several links which
are displayed as boxes surrounded by a blue line when converted to PDF.

Example 5. hyphenation.c
========================

There isn't much to say about this example. It just takes a list of words
and outputs its possible hyphenations.

Example 6. fontsample.c
========================

This is a very handy program to output a page with a font sample for a
given font. It's been created to demonstrate font encoding and the
PS_symbol... functions. Font encoding is actually something you should
not have to care about very much. The font encoding vector tells the
PostScript engine which glyph is mapped to a char in the PostScript
document. The default font encoding used by pslib is TeXBase1 which
is also used by dvips.

Example 7. ligatures.c
========================

Output several ligatures of AlteSchwabacher which has a very strange
font encoding and needs some manual corrections in the encoding file.

Example 8. spotcolor.c
========================

Spot colors can be used with pslib almost as easy as colors in one of
the other available color spaces. This example shows five different spot
colors each with ten different tint values (10-100 %). Do not be
confused by the fact that the colors may not look exactly like you
would have expected them, when you view them on the screen or print
them on a regular printer. Each spot color has an alternative color,
which is what you see. This color can only be an approximation of what
the real color looks like. If the document is separated and profesionally
printed, you will get what you expect.

Example 9. overprint.c
========================

There is not much to tell about this example. It prints a small rectangle
on a larger rectangle. Both have different color. If you separate such
a file, the large rectangle will usually have a white spot where the small
rectangle is located because the color of the small rect will not overprint
the color beneath. This is different when you set overprint mode on. Then
the color beneath will be overprinted with the small rectancle. One would
like this behaviour with black text.

Example 10. shading.c
========================
This rather complex example shows many ways on how shading can be used.
It is quite impressing to see how easily a page can look nice with some
shading.

Example 11. image.c
========================
Image handling is something pslib is capable for some time. This example
concentrates on reading images in different formats.

Example 12. imagereuse.c
========================
Image can become very big, expecially when they are inserted into the
PostScript document. Something missing in pslib was the ability to reuse
images throughout the document. This was added in version 0.4.5 and became
the default behaviour. Beside a vast reduction in file size, processing
of the document is also speed up as seen on the pages 2 and 3 when displayed
with ghostscript.

Example 13. cmyk.c
========================
Color separation isn't neccessarily something you have to take care of
if you have a PostScript document printed. Anyway, this example demonstrate
how easily pslib can separate colors during the creation of the document.
The example produces 4 pages, one page for each process color. It is done
by calling the same page creation function four times after setting the
value 'separationcolor'.

Where can I get the fonts?
==========================

Alte Schwabacher and many more fonts can be downloaded at
http://www.moorstation.org/typoasis/designers/steffmann/