This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
README
89 lines (61 loc) · 2.33 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
About
~~~~~
u2ps is text to postscript converter similar to a2ps,
with emphasis on Unicode support.
Key features:
* utf8 support implemented (mostly) in PostScript
* clean, readable and reasonably small output files
* font subset embedding for Type 1 and Type 42 (TTF) fonts
* ANSI control sequences support (color and font variants)
Things missing at present:
- proper combining mark positioning
- reordering and ligatures
- bidi support
The tool should be usable on any reasonably sane system with
Ghostscript installed.
As long as the input does not stray too far from common left-to-right
scripts and usable fonts are available, u2ps should work well.
Current version is probably the last one using mostly-postscript
mostly-font-agnostic approach; check TODO for further development ideas.
Installation
~~~~~~~~~~~~
Common C library, make and cc are needed to build u2ps.
Font reduction needs ghostscript at runtime.
./configure --prefix=...
make
make install
Unless told otherwise, u2ps defaults to FreeMono font.
Make sure to have it installed.
For hacking/debugging, run "./configure devel" instead, the resulting
executable will work right from the source directory.
Documentation
~~~~~~~~~~~~~
See man page and text files in doc/ directory.
Sample usage
~~~~~~~~~~~~
The files in text/ directory may be used as a showcase for u2ps features.
Assuming u2ps is built in devel mode (./configure devel), run
./u2ps text/ansi.txt
./u2ps text/alph.txt
./u2ps text/utf8.txt
./u2ps -2 -f FreeMono -f Kochi -f Tlwg text/alph.txt
./u2ps -2 -f FreeMono -f Kochi -f Tlwg text/utf8.txt
The last two commands assume Kochi-Mincho (http://en.osdn.jp/projects/efont/)
and Tlwg (http://linux.thai.net/projects/fonts-tlwg) fonts are installed
in the system and Ghostscript knows where to find them.
Sample usage with individual font setting:
./u2ps -2 -f FreeMono -fC:SawarabiGothic-Medium text/alph.txt
This works for fonts not known to u2ps.
Github note
~~~~~~~~~~~
This is a modernized version of my old project from Berlios,
now rewritten in C, with lots of incompatible changes.
Check perl branch for the original code if you need it.
License
~~~~~~~
GPL v3, see LICENSE file
Credits
~~~~~~~
Written by Alex Suykov <alex.suykov@gmail.com>
with patches from Pierre Dehaen <dehaen@drever.be>
and Ionel Mugurel Ciobîcă <I.M.Ciobica@tue.nl>