• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

AlteSchwabacher.afmH A D02-Nov-201911.8 KiB

AlteSchwabacher.encH A D02-Nov-20193.7 KiB9796

ChangeLogH A D02-Nov-2019414 2216

Courier.afmH A D02-Nov-201915 KiB

Helvetica.afmH A D02-Nov-201917.4 KiB

Helvetica.proH A D02-Nov-2019597 3332

Makefile.unixH A D02-Nov-20194 KiB166130

READMEH A D02-Nov-20196 KiB151119

cmyk.cH A D02-Nov-20192.4 KiB11591

cork.encH A D02-Nov-20193.2 KiB8079

dice.afmH A D02-Nov-2019696

draw.cH A D02-Nov-201922.6 KiB743667

einstein.cH A D02-Nov-20194.1 KiB149132

fontcreate.cH A D02-Nov-20195.4 KiB227200

fontsample.cH A D02-Nov-20196 KiB159134

glyphlist.cH A D02-Nov-20194.6 KiB159130

hyperlinks.cH A D02-Nov-20191.9 KiB6551

hyph_de.dicH A D02-Nov-201941.6 KiB5,8005,799

hyph_en.dicH A D02-Nov-201988.5 KiB11,38911,388

hyphenate.cH A D02-Nov-20191.1 KiB5949

image.cH A D02-Nov-20197 KiB230191

imagereuse.cH A D02-Nov-20193.4 KiB155124

ligatures.cH A D02-Nov-20195.8 KiB10592

ligexperts.cH A D02-Nov-20197 KiB151143

logos.cH A D02-Nov-20193.1 KiB133106

memory.cH A D02-Nov-2019984 5442

mmk.cH A D02-Nov-20193.9 KiB146126

overprint.cH A D02-Nov-20191.7 KiB8160

pagehook.cH A D02-Nov-20194 KiB129100

picture.epsH A D02-Nov-201917.3 KiB

polish.cH A D02-Nov-20191.6 KiB6853

poster.cH A D02-Nov-20193.1 KiB11896

psclock.cH A D02-Nov-20193 KiB13899

schematic.cH A D02-Nov-20197.1 KiB281245

shading.cH A D02-Nov-201913.1 KiB279232

showbox.cH A D02-Nov-20193.5 KiB6957

spotcolor.cH A D02-Nov-20193.3 KiB132110

txt2ps.cH A D02-Nov-20193.7 KiB150133

README

1These are example written in C for the PostScript library pslib.
2
3How to run the examples
4=======================
5
6Run 'make <ps file>' to create a particular PostScript file.
7<ps file> is one of the example names with extension '.ps'. To run the
8example 2 just type 'make psclock.ps'. Alternatively, run 'make run'
9to compile an run all examples.
10
11How to compile the examples
12===========================
13
14Just type make to compile all examples.
15
16How to get help
17===============
18
19Type 'make help' for a list of available make targets and a short
20description.
21
22Example 1: draw.c
23=================
24
25This is the most complete example demonstrating many aspects of
26pslib. It contains of many single boxes, each presenting a feature
27of pslib.
28
29Example 2. psclock.c
30====================
31
32Those who know pdflib (TM) (see http://www.pdflib.com) will probably
33know this example. It draws an analog clock on a single page showing the
34current time. The same example is shipped with pdflib.
35If you create several hundred pages then this example can somewhat
36serve as a simple benchmark. Just count the pages between two
37seconds. On my rather slow PowerPC 400 MHz it easily creates more than
38400 pages a second.
39The number of pages can be set in the variable numpages in the C source file.
40
41Example 3. einstein.c
42=====================
43
44This is basically a three pages text document. It was written in german
45bei Albert Einstein. I uses the font Schwabacher because of its many
46ligatures which is a perfect way to show some of pslib's enhanced text output
47features. The font itself does not contain any ligature information.
48That's why the encoding file is provided. The encoding vector itself
49is not used, but the ligatures in the head of the file. The font is
50also very buggy because the ligatures do not even have propper names.
51They are randomly placed all over the font replacing other glyphs.
52This explains the strange names of the ligatures in the encoding file.
53The text is set in two columns using hyphenation. Paragraphs are
54separated by a carrige return on a single line. The first line of
55a paragraph is indented. Paragraphs are also separated with extra
56space.
57
58Example 4. hyperlinks.c
59=======================
60
61pslib supports pdfmarks which allows to place code into the PostScript
62document which is disregarded by the printer but will be evaluated by
63Acrobat Distiller (TM) or Ghostscript when it is converted to PDF.
64Such pdfmarks can preserve features only supported by PDF in a PostScript
65document. This example is a two page document. The pages have different
66size and both have a bookmark. Page one contains several links which
67are displayed as boxes surrounded by a blue line when converted to PDF.
68
69Example 5. hyphenation.c
70========================
71
72There isn't much to say about this example. It just takes a list of words
73and outputs its possible hyphenations.
74
75Example 6. fontsample.c
76========================
77
78This is a very handy program to output a page with a font sample for a
79given font. It's been created to demonstrate font encoding and the
80PS_symbol... functions. Font encoding is actually something you should
81not have to care about very much. The font encoding vector tells the
82PostScript engine which glyph is mapped to a char in the PostScript
83document. The default font encoding used by pslib is TeXBase1 which
84is also used by dvips.
85
86Example 7. ligatures.c
87========================
88
89Output several ligatures of AlteSchwabacher which has a very strange
90font encoding and needs some manual corrections in the encoding file.
91
92Example 8. spotcolor.c
93========================
94
95Spot colors can be used with pslib almost as easy as colors in one of
96the other available color spaces. This example shows five different spot
97colors each with ten different tint values (10-100 %). Do not be
98confused by the fact that the colors may not look exactly like you
99would have expected them, when you view them on the screen or print
100them on a regular printer. Each spot color has an alternative color,
101which is what you see. This color can only be an approximation of what
102the real color looks like. If the document is separated and profesionally
103printed, you will get what you expect.
104
105Example 9. overprint.c
106========================
107
108There is not much to tell about this example. It prints a small rectangle
109on a larger rectangle. Both have different color. If you separate such
110a file, the large rectangle will usually have a white spot where the small
111rectangle is located because the color of the small rect will not overprint
112the color beneath. This is different when you set overprint mode on. Then
113the color beneath will be overprinted with the small rectancle. One would
114like this behaviour with black text.
115
116Example 10. shading.c
117========================
118This rather complex example shows many ways on how shading can be used.
119It is quite impressing to see how easily a page can look nice with some
120shading.
121
122Example 11. image.c
123========================
124Image handling is something pslib is capable for some time. This example
125concentrates on reading images in different formats.
126
127Example 12. imagereuse.c
128========================
129Image can become very big, expecially when they are inserted into the
130PostScript document. Something missing in pslib was the ability to reuse
131images throughout the document. This was added in version 0.4.5 and became
132the default behaviour. Beside a vast reduction in file size, processing
133of the document is also speed up as seen on the pages 2 and 3 when displayed
134with ghostscript.
135
136Example 13. cmyk.c
137========================
138Color separation isn't neccessarily something you have to take care of
139if you have a PostScript document printed. Anyway, this example demonstrate
140how easily pslib can separate colors during the creation of the document.
141The example produces 4 pages, one page for each process color. It is done
142by calling the same page creation function four times after setting the
143value 'separationcolor'.
144
145Where can I get the fonts?
146==========================
147
148Alte Schwabacher and many more fonts can be downloaded at
149http://www.moorstation.org/typoasis/designers/steffmann/
150
151