author | Rich Burridge <rich.burridge@oracle.com> |
Tue, 13 Sep 2016 14:01:54 -0700 | |
changeset 6897 | 95d141a9085b |
permissions | -rw-r--r-- |
6897
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
1 |
Composite fonts support, needed for handling Japanese EUC-JP encoding |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
2 |
Roughly based on Yasuyuki Furukawa's patch |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
3 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
4 |
See: https://patches.ubuntu.com/by-release/extracted/ubuntu/a/a2ps/1:4.13c~rc5-1/02_composite_fonts.dpatch |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
5 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
6 |
## 02_composite_fonts.dpatch by Masayuki Hatta <[email protected]> |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
7 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
8 |
Index: b/encoding/Makefile.am |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
9 |
=================================================================== |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
10 |
--- a/encoding/Makefile.am |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
11 |
+++ b/encoding/Makefile.am |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
12 |
@@ -16,7 +16,7 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
13 |
minor_encodings = \ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
14 |
ms-cp1250.edf hp.edf mac.edf ibm-cp437.edf ibm-cp850.edf iso2.edf \ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
15 |
iso3.edf iso4.edf iso5.edf iso7.edf iso9.edf iso10.edf iso13.edf \ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
16 |
-iso15.edf koi8.edf ms-cp1251.edf |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
17 |
+iso15.edf koi8.edf ms-cp1251.edf euc-jp.edf |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
18 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
19 |
if EXTENSIONS |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
20 |
encodings_DATA = encoding.map $(major_encodings) $(minor_encodings) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
21 |
Index: b/encoding/Makefile.in |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
22 |
=================================================================== |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
23 |
--- a/encoding/Makefile.in |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
24 |
+++ b/encoding/Makefile.in |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
25 |
@@ -270,7 +270,7 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
26 |
minor_encodings = \ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
27 |
ms-cp1250.edf hp.edf mac.edf ibm-cp437.edf ibm-cp850.edf iso2.edf \ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
28 |
iso3.edf iso4.edf iso5.edf iso7.edf iso9.edf iso10.edf iso13.edf \ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
29 |
-iso15.edf koi8.edf ms-cp1251.edf |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
30 |
+iso15.edf koi8.edf ms-cp1251.edf euc-jp.edf |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
31 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
32 |
@EXTENSIONS_FALSE@encodings_DATA = encoding.map $(major_encodings) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
33 |
@EXTENSIONS_TRUE@encodings_DATA = encoding.map $(major_encodings) $(minor_encodings) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
34 |
Index: b/encoding/encoding.map |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
35 |
=================================================================== |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
36 |
--- a/encoding/encoding.map |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
37 |
+++ b/encoding/encoding.map |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
38 |
@@ -93,6 +93,12 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
39 |
koi8 koi8 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
40 |
koi koi8 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
41 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
42 |
+euc-jp euc-jp |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
43 |
+eucjp euc-jp |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
44 |
+japanese euc-jp |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
45 |
+ja euc-jp |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
46 |
+jp euc-jp |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
47 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
48 |
######################################################################## |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
49 |
# Some architectures specific char sets |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
50 |
######################################################################## |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
51 |
Index: b/encoding/euc-jp.edf |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
52 |
=================================================================== |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
53 |
--- /dev/null |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
54 |
+++ b/encoding/euc-jp.edf |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
55 |
@@ -0,0 +1,95 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
56 |
+# Description of the EUC-JP encoding |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
57 |
+# Copyright (c) 1988, 89, 90, 91, 92, 93 Miguel Santana |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
58 |
+# Copyright (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
59 |
+# Copyright (c) 2003 Masayuki Hatta |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
60 |
+# |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
61 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
62 |
+# This program is free software; you can redistribute it and/or modify |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
63 |
+# it under the terms of the GNU General Public License as published by |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
64 |
+# the Free Software Foundation; either version 2, or (at your option) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
65 |
+# any later version. |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
66 |
+# |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
67 |
+# This program is distributed in the hope that it will be useful, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
68 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
69 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
70 |
+# GNU General Public License for more details. |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
71 |
+# |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
72 |
+# You should have received a copy of the GNU General Public License |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
73 |
+# along with this program; see the file COPYING. If not, write to |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
74 |
+# the Free Software Foundation, 59 Temple Place - Suite 330, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
75 |
+# Boston, MA 02111-1307, USA. |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
76 |
+# |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
77 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
78 |
+Name: EUC-JP |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
79 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
80 |
+Documentation |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
81 |
+The EUC-JP encoding is a 8-bit character set widely used in Japan. |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
82 |
+EndDocumentation |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
83 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
84 |
+# If there is an unknown font requested, use Courier |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
85 |
+Default: Courier |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
86 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
87 |
+# Automatic spell checking :) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
88 |
+Substitute: Times Times-Roman |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
89 |
+Substitute: Helvetica-Italic Helvetica-Oblique |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
90 |
+Substitute: Helvetica-BoldItalic Helvetica-BoldOblique |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
91 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
92 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
93 |
+# SlantFont for Japanese Italic Kanji font |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
94 |
+# new font source font value |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
95 |
+SlantFont: Ryumin-Light-EUC-H-Italic Ryumin-Light-EUC-H 0.2 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
96 |
+SlantFont: GothicBBB-Medium-EUC-H-Italic GothicBBB-Medium-EUC-H 0.2 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
97 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
98 |
+# Compose fonts for Japanese EUC code |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
99 |
+# target font additional font width size rate |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
100 |
+DefaultComposite: Ryumin-Light-EUC-H 1.0 1.1 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
101 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
102 |
+# 1:2 fixed |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
103 |
+#DefaultComposite: Ryumin-Light-EUC-H 1.0 0.8333 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
104 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
105 |
+# 1:1 fixed |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
106 |
+#DefaultComposite: Ryumin-Light-EUC-H 1.0 1.6666 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
107 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
108 |
+Composite: Helvetica GothicBBB-Medium-EUC-H 1.0 1.1 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
109 |
+Composite: Helvetica-Oblique GothicBBB-Medium-EUC-H-Italic 1.0 1.1 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
110 |
+Composite: Helvetica-Bold GothicBBB-Medium-EUC-H 1.0 1.1 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
111 |
+Composite: Helvetica-BoldOblique GothicBBB-Medium-EUC-H-Italic 1.0 1.1 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
112 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
113 |
+Composite: Courier-Oblique Ryumin-Light-EUC-H-Italic 1.0 1.1 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
114 |
+Composite: Courier-Bold GothicBBB-Medium-EUC-H 1.0 1.1 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
115 |
+Composite: Courier-BoldOblique GothicBBB-Medium-EUC-H-Italic 1.0 1.1 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
116 |
+Composite: Times-Bold GothicBBB-Medium-EUC-H 1.0 1.1 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
117 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
118 |
+Vector: |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
119 |
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
120 |
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
121 |
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
122 |
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
123 |
+space exclam quotedbl numbersign dollar percent ampersand quoteright |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
124 |
+parenleft parenright asterisk plus comma minus period slash |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
125 |
+zero one two three four five six seven |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
126 |
+eight nine colon semicolon less equal greater question |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
127 |
+at A B C D E F G |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
128 |
+H I J K L M N O |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
129 |
+P Q R S T U V W |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
130 |
+X Y Z bracketleft backslash bracketright asciicircum underscore |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
131 |
+quoteleft a b c d e f g |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
132 |
+h i j k l m n o |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
133 |
+p q r s t u v w |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
134 |
+x y z braceleft bar braceright asciitilde .notdef |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
135 |
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
136 |
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
137 |
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
138 |
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
139 |
+space exclamdown cent sterling currency yen brokenbar section |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
140 |
+dieresis copyright ordfeminine guillemotleft logicalnot hyphen registered macron |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
141 |
+degree plusminus twosuperior threesuperior acute mu paragraph bullet |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
142 |
+cedilla onesuperior ordmasculine guillemotright onequarter onehalf threequarters questiondown |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
143 |
+Agrave Aacute Acircumflex Atilde Adieresis Aring AE Ccedilla |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
144 |
+Egrave Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
145 |
+Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis multiply |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
146 |
+Oslash Ugrave Uacute Ucircumflex Udieresis Yacute Thorn germandbls |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
147 |
+agrave aacute acircumflex atilde adieresis aring ae ccedilla |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
148 |
+egrave eacute ecircumflex edieresis igrave iacute icircumflex idieresis |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
149 |
+eth ntilde ograve oacute ocircumflex otilde odieresis divide |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
150 |
+oslash ugrave uacute ucircumflex udieresis yacute thorn ydieresis |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
151 |
Index: b/lib/encoding.c |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
152 |
=================================================================== |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
153 |
--- a/lib/encoding.c |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
154 |
+++ b/lib/encoding.c |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
155 |
@@ -389,15 +389,25 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
156 |
* Association of suffixes rules, and corresponding style sheet |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
157 |
* (The hashing is upon `alias') |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
158 |
*/ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
159 |
+struct slantfont_info { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
160 |
+ char * name; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
161 |
+ char * src; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
162 |
+ float ratio; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
163 |
+}; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
164 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
165 |
struct encoding { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
166 |
char * key; /* e.g. latin1 */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
167 |
char * name; /* e.g. ISO Latin 1 */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
168 |
+ int composite_flag; /* flag for composite font */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
169 |
uchar * documentation; /* Useful pieces of text */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
170 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
171 |
char * default_font; /* When a font can't be used |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
172 |
define the font to use */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
173 |
struct pair_htable * substitutes; /* e.g. in latin2, don't use |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
174 |
* Courier, but Courier-Ogonki */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
175 |
+ struct pair_htable * composite; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
176 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
177 |
+ struct slantfont_info slantfont[NB_FACES]; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
178 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
179 |
char * vector[256]; /* Define the char set */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
180 |
struct darray * font_names_used; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
181 |
@@ -407,6 +417,9 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
182 |
struct hash_table_s * fonts; /* Contains cells that are |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
183 |
* 1. name of font, 2. int wx[256] */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
184 |
unsigned int * faces_wx[NB_FACES]; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
185 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
186 |
+ unsigned int composite_wx[NB_FACES]; /* fixed length font width */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
187 |
+ float composite_ratio[NB_FACES]; /* size ratio of additonal and original font */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
188 |
}; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
189 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
190 |
/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
191 |
@@ -423,9 +436,12 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
192 |
res->name = NULL; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
193 |
res->default_font = NULL; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
194 |
res->documentation = NULL; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
195 |
+ res->composite_flag = false; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
196 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
197 |
/* Vector will be set by setup */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
198 |
res->substitutes = pair_table_new (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
199 |
+ res->composite = pair_table_new (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
200 |
+ res->slantfont[0].name = NULL; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
201 |
res->font_names_used = da_new ("List of font names", 10, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
202 |
da_linear, 10, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
203 |
(da_print_func_t) da_str_print, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
204 |
@@ -471,6 +487,34 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
205 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
206 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
207 |
/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
208 |
+ * Add a composite font in the current encoding |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
209 |
+ */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
210 |
+static void |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
211 |
+encoding_add_composite_font (struct encoding * encoding, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
212 |
+ const char * orig, const char * subs, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
213 |
+ int wx, float ratio) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
214 |
+{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
215 |
+ encoding->composite_flag = true; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
216 |
+ pair_add2 (encoding->composite, orig, subs, wx, ratio); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
217 |
+} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
218 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
219 |
+/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
220 |
+ * Add a composite font in the current encoding |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
221 |
+ */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
222 |
+static void |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
223 |
+encoding_add_slant_font (struct encoding * encoding, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
224 |
+ const char * new, const char * src, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
225 |
+ float ratio) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
226 |
+{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
227 |
+ static num = 0; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
228 |
+ encoding->slantfont[num].name = strdup(new); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
229 |
+ encoding->slantfont[num].src = strdup(src); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
230 |
+ encoding->slantfont[num].ratio = ratio; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
231 |
+ encoding->slantfont[num+1].name = NULL; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
232 |
+ num++; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
233 |
+} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
234 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
235 |
+/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
236 |
* When FONT_NAME is used with ENCODING, return the |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
237 |
* real font name to use (e.g., in latin2, Courier-Ogonki |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
238 |
* should be returned when asked for Courier). |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
239 |
@@ -514,6 +558,77 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
240 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
241 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
242 |
message (msg_enc, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
243 |
+ (stderr, "In encoding %s, composite font for %s is resolved as %s\n", |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
244 |
+ encoding->key, font_name, res)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
245 |
+ return res; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
246 |
+} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
247 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
248 |
+/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
249 |
+ * Get composite font size and ratio |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
250 |
+ */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
251 |
+static int |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
252 |
+composite_font_info_get_wx(struct a2ps_job * job, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
253 |
+ struct encoding * encoding, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
254 |
+ const char * font_list) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
255 |
+{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
256 |
+ int wx= -1; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
257 |
+ char * font_list_copy; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
258 |
+ char * font_name; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
259 |
+ astrcpy (font_list_copy, font_list); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
260 |
+ font_name = strtok (font_list_copy, ",<>;"); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
261 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
262 |
+ wx = pair_get_wx (encoding->composite, font_name); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
263 |
+ if (wx<0) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
264 |
+ wx = pair_get_wx (encoding->composite, "default_composite__"); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
265 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
266 |
+ return wx; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
267 |
+} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
268 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
269 |
+static float |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
270 |
+composite_font_info_get_ratio(struct a2ps_job * job, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
271 |
+ struct encoding * encoding, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
272 |
+ const char * font_list) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
273 |
+{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
274 |
+ float ratio= -1; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
275 |
+ char * font_list_copy; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
276 |
+ char * font_name; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
277 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
278 |
+ astrcpy (font_list_copy, font_list); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
279 |
+ font_name = strtok (font_list_copy, ",<>;"); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
280 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
281 |
+ ratio = pair_get_ratio (encoding->composite, font_name); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
282 |
+ if (ratio<0) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
283 |
+ ratio = pair_get_ratio (encoding->composite, "default_composite__"); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
284 |
+ return ratio; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
285 |
+} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
286 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
287 |
+const char * |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
288 |
+encoding_resolve_composite_font (struct a2ps_job * job, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
289 |
+ struct encoding * encoding, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
290 |
+ const char * font_list) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
291 |
+{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
292 |
+ const char * res = NULL; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
293 |
+ char * font_list_copy; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
294 |
+ char * font_name; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
295 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
296 |
+ astrcpy (font_list_copy, font_list); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
297 |
+ font_name = strtok (font_list_copy, ",<>;"); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
298 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
299 |
+ /* Find if there is a substitute for that font */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
300 |
+ res = pair_get (encoding->composite, font_name); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
301 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
302 |
+ /* We've found nothing interesting. Last chance is the default |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
303 |
+ * font */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
304 |
+ if (!res) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
305 |
+ { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
306 |
+ res = pair_get (encoding->composite, "default_composite__"); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
307 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
308 |
+ if (!res) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
309 |
+ error (1, 0, "Cannot find font %s, nor any composite font", |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
310 |
+ font_name); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
311 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
312 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
313 |
+ message (msg_enc, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
314 |
(stderr, "In encoding %s, font %s is resolved as %s\n", |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
315 |
encoding->key, font_name, res)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
316 |
return res; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
317 |
@@ -633,6 +748,66 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
318 |
subs = token2; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
319 |
encoding_add_font_substitute (encoding, orig, subs); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
320 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
321 |
+ else if (strequ (token, "DefaultComposite:")) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
322 |
+ { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
323 |
+ char * orig, * subs; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
324 |
+ int wx; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
325 |
+ float ratio; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
326 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
327 |
+ token2 = GET_TOKEN (NULL); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
328 |
+ CHECK_TOKEN (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
329 |
+ subs = token2; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
330 |
+ token2 = GET_TOKEN (NULL); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
331 |
+ CHECK_TOKEN (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
332 |
+ wx = (int)atof(token2)*1000; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
333 |
+ token2 = GET_TOKEN (NULL); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
334 |
+ CHECK_TOKEN (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
335 |
+ ratio = atof(token2); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
336 |
+ encoding_add_composite_font(encoding, "default_composite__", |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
337 |
+ subs, wx, ratio); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
338 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
339 |
+ else if (strequ (token, "Composite:")) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
340 |
+ { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
341 |
+ char * orig, * subs; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
342 |
+ int wx; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
343 |
+ float ratio; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
344 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
345 |
+ token2 = GET_TOKEN (NULL); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
346 |
+ CHECK_TOKEN (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
347 |
+ orig = token2; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
348 |
+ token2 = GET_TOKEN (NULL); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
349 |
+ CHECK_TOKEN (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
350 |
+ subs = token2; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
351 |
+ token2 = GET_TOKEN (NULL); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
352 |
+ CHECK_TOKEN (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
353 |
+ wx = (int)atof(token2)*1000; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
354 |
+ token2 = GET_TOKEN (NULL); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
355 |
+ CHECK_TOKEN (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
356 |
+ ratio = atof(token2); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
357 |
+ encoding_add_composite_font(encoding, orig, subs, wx, ratio); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
358 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
359 |
+ else if (strequ (token, "SlantFont:")) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
360 |
+ { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
361 |
+ char * new, * src; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
362 |
+ float ratio; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
363 |
+ unsigned int num; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
364 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
365 |
+ token2 = GET_TOKEN (NULL); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
366 |
+ CHECK_TOKEN (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
367 |
+ new = token2; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
368 |
+ token2 = GET_TOKEN (NULL); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
369 |
+ CHECK_TOKEN (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
370 |
+ src = token2; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
371 |
+ token2 = GET_TOKEN (NULL); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
372 |
+ CHECK_TOKEN (); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
373 |
+ ratio = atof(token2); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
374 |
+ for (num = 0 ; encoding->slantfont[num].name ; num ++ ); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
375 |
+ if (num > sizeof encoding->slantfont - 1){ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
376 |
+ error_at_line (1, 0, fname, firstline, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
377 |
+ _("too many slant font: `%s'"), new); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
378 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
379 |
+ encoding_add_slant_font(encoding, new, src, ratio); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
380 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
381 |
else |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
382 |
error_at_line (1, 0, fname, firstline, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
383 |
_("invalid option `%s'"), quotearg (token)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
384 |
@@ -754,6 +929,15 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
385 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
386 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
387 |
/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
388 |
+ * Return the flag of composite flag |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
389 |
+ */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
390 |
+int |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
391 |
+encoding_get_composite_flag (struct encoding * enc) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
392 |
+{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
393 |
+ return enc->composite_flag; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
394 |
+} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
395 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
396 |
+/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
397 |
* Prepare the environment (a dictionary) for the support |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
398 |
* of ENCODING, dump it into STREAM. |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
399 |
* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
400 |
@@ -766,9 +950,11 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
401 |
struct encoding * encoding) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
402 |
{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
403 |
size_t i, nb; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
404 |
+ size_t ns; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
405 |
const char * real_font_name; /* After subsitution */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
406 |
char ** font_names = (char **) encoding->font_names_used->content; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
407 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
408 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
409 |
/* How many fonts are there? */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
410 |
da_qsort (encoding->font_names_used); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
411 |
da_unique (encoding->font_names_used, (da_map_func_t) free); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
412 |
@@ -787,15 +973,46 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
413 |
* in the current ENCODING */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
414 |
nb = encoding->font_names_used->len; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
415 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
416 |
+ /* The number of slant fonts */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
417 |
+ for (i= 0, ns=0 ; encoding->slantfont[i].name ; i++ ) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
418 |
+ ns++; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
419 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
420 |
/* Create the dictionary and fill it */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
421 |
fprintf (stream, "%% Dictionary for %s support\n", |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
422 |
encoding->name); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
423 |
- fprintf (stream, "/%sdict %d dict begin\n", encoding->key, nb); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
424 |
+ fprintf (stream, "/%sdict %d dict begin\n", encoding->key, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
425 |
+ (encoding->composite_flag == true)? nb+nb+ns:nb+ns); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
426 |
for (i = 0 ; i < nb ; i++) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
427 |
fprintf (stream, " /f%s %sEncoding /%s reencode_font\n", |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
428 |
font_names [i], |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
429 |
encoding->name, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
430 |
encoding_resolve_font_substitute (job, encoding, font_names [i])); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
431 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
432 |
+ /* Slant font setting */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
433 |
+ for (i = 0 ; encoding->slantfont[i].name ; i++ ) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
434 |
+ fprintf (stream, " /%s /%s %f slantfont definefont pop\n", |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
435 |
+ encoding->slantfont[i].name, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
436 |
+ encoding->slantfont[i].src, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
437 |
+ encoding->slantfont[i].ratio); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
438 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
439 |
+ /* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
440 |
+ * Composite font setting. |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
441 |
+ * If kanji font size is larger than alphabet character, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
442 |
+ * set base font size to kanji charactor size. |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
443 |
+ */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
444 |
+ if (encoding->composite_flag == true) { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
445 |
+ for (i = 0 ; i < nb ; i++) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
446 |
+ fprintf (stream, " /f%s /f%s /%s %f %f false compositefont " |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
447 |
+ "%f scalefont def\n", |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
448 |
+ font_names [i], |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
449 |
+ font_names [i], |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
450 |
+ encoding_resolve_composite_font (job, encoding, font_names [i]), |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
451 |
+ encoding->composite_ratio[i], |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
452 |
+ (encoding->composite_ratio[i] > 1.0)? |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
453 |
+ 0: (1-encoding->composite_ratio[i])/2.0, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
454 |
+ (encoding->composite_ratio[i] > 1.0)? |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
455 |
+ 1.0/encoding->composite_ratio[i]: 1.0 ); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
456 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
457 |
fputs ("currentdict end def\n", stream); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
458 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
459 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
460 |
@@ -939,6 +1156,22 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
461 |
true_font_name, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
462 |
encoding->vector, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
463 |
encoding->faces_wx [face]); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
464 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
465 |
+ if (encoding->composite_flag) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
466 |
+ { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
467 |
+ encoding->composite_ratio[i] = |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
468 |
+ composite_font_info_get_ratio(job, encoding, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
469 |
+ job->face_eo_font [face]); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
470 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
471 |
+ encoding->composite_wx[i] = |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
472 |
+ composite_font_info_get_wx(job, encoding, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
473 |
+ job->face_eo_font [face]); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
474 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
475 |
+ /* If kanji font size is larger than alphabet character, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
476 |
+ fit kanji charactor size to base font size */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
477 |
+ if (encoding->composite_ratio[i] < 1.0) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
478 |
+ encoding->composite_wx[i] *= encoding->composite_ratio[i]; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
479 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
480 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
481 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
482 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
483 |
@@ -1073,6 +1306,13 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
484 |
return 0; /* For -Wall */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
485 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
486 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
487 |
+unsigned int |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
488 |
+char_composite_WX (a2ps_job * job, uchar c) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
489 |
+{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
490 |
+ return (job->encoding->composite_wx[job->status->face]/ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
491 |
+ job->encoding->composite_ratio[job->status->face]); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
492 |
+} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
493 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
494 |
/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
495 |
* Returns the WX of a string (including M- and ^) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
496 |
*/ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
497 |
Index: b/lib/encoding.h |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
498 |
=================================================================== |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
499 |
--- a/lib/encoding.h |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
500 |
+++ b/lib/encoding.h |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
501 |
@@ -43,6 +43,7 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
502 |
*/ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
503 |
unsigned int char_WX PARAMS ((struct a2ps_job * job, uchar c)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
504 |
unsigned int string_WX PARAMS ((struct a2ps_job * job, uchar * string)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
505 |
+unsigned int char_composite_WX PARAMS ((struct a2ps_job * job, uchar c)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
506 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
507 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
508 |
/************************************************************************/ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
509 |
@@ -56,6 +57,7 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
510 |
FILE * stream)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
511 |
int encoding_char_exists PARAMS ((struct encoding * enc, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
512 |
enum face_e face, uchar c)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
513 |
+int encoding_get_composite_flag (struct encoding * enc); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
514 |
struct encoding * |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
515 |
get_encoding_by_alias PARAMS ((struct a2ps_job * job, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
516 |
char *string)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
517 |
@@ -70,6 +72,12 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
518 |
PARAMS ((struct a2ps_job * job, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
519 |
struct encoding * encoding, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
520 |
const char * font_name)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
521 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
522 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
523 |
+const char * encoding_resolve_composite_font |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
524 |
+ PARAMS ((struct a2ps_job * job, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
525 |
+ struct encoding * encoding, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
526 |
+ const char * font_name)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
527 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
528 |
/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
529 |
* Have a struct encoding determine the faces_wx |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
530 |
Index: b/lib/pair_ht.c |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
531 |
=================================================================== |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
532 |
--- a/lib/pair_ht.c |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
533 |
+++ b/lib/pair_ht.c |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
534 |
@@ -49,6 +49,8 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
535 |
{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
536 |
char * key; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
537 |
char * value; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
538 |
+ float ratio; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
539 |
+ int wx; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
540 |
}; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
541 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
542 |
/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
543 |
@@ -165,6 +167,37 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
544 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
545 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
546 |
/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
547 |
+ * Add a pair, with your own allocation for them. |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
548 |
+ * It KEY is yet used, override its value with VALUE |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
549 |
+ */ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
550 |
+void |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
551 |
+pair_add2 (struct hash_table_s * table, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
552 |
+ const char * key, const char * value, int wx, float ratio) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
553 |
+{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
554 |
+ struct pair * item, token; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
555 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
556 |
+ token.key = (char *) key; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
557 |
+ item = (struct pair *) hash_find_item (table, &token); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
558 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
559 |
+ if (item) { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
560 |
+ if (item->value) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
561 |
+ free (item->value); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
562 |
+ } else { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
563 |
+ item = XMALLOC (struct pair, 1); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
564 |
+ item->key = xstrdup(key); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
565 |
+ item->wx = wx; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
566 |
+ item->ratio = ratio; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
567 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
568 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
569 |
+ if (value) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
570 |
+ item->value = xstrdup (value); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
571 |
+ else |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
572 |
+ item->value = NULL; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
573 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
574 |
+ hash_insert (table, item); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
575 |
+} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
576 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
577 |
+/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
578 |
* Remove a pair and free it. |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
579 |
* It KEY is yet used, override its value with VALUE |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
580 |
*/ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
581 |
@@ -201,6 +234,34 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
582 |
return NULL; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
583 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
584 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
585 |
+int |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
586 |
+pair_get_wx (struct hash_table_s * table, const char * key) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
587 |
+{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
588 |
+ struct pair * item, token; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
589 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
590 |
+ token.key = (char *) key; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
591 |
+ item = (struct pair *) hash_find_item (table, &token); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
592 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
593 |
+ if (item) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
594 |
+ return item->wx; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
595 |
+ else |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
596 |
+ return -1; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
597 |
+} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
598 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
599 |
+float |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
600 |
+pair_get_ratio (struct hash_table_s * table, const char * key) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
601 |
+{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
602 |
+ struct pair * item, token; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
603 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
604 |
+ token.key = (char *) key; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
605 |
+ item = (struct pair *) hash_find_item (table, &token); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
606 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
607 |
+ if (item) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
608 |
+ return item->ratio; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
609 |
+ else |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
610 |
+ return -1; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
611 |
+} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
612 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
613 |
/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
614 |
* Return the content of the hash table, ordered |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
615 |
*/ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
616 |
Index: b/lib/pair_ht.h |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
617 |
=================================================================== |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
618 |
--- a/lib/pair_ht.h |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
619 |
+++ b/lib/pair_ht.h |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
620 |
@@ -56,6 +56,10 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
621 |
void pair_add PARAMS ((struct pair_htable * table, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
622 |
const char * key, const char * value)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
623 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
624 |
+void pair_add2 PARAMS ((struct pair_htable * table, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
625 |
+ const char * key, const char * value, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
626 |
+ int wx, float ratio)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
627 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
628 |
/* |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
629 |
* The key and value of the matching item will be free'd |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
630 |
* (No problem if KEY matches nothing) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
631 |
@@ -68,6 +72,10 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
632 |
*/ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
633 |
char * pair_get PARAMS ((struct pair_htable * table, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
634 |
const char * key)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
635 |
+int pair_get_wx PARAMS ((struct pair_htable * table, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
636 |
+ const char * key)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
637 |
+float pair_get_ratio PARAMS ((struct pair_htable * table, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
638 |
+ const char * key)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
639 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
640 |
void pair_table_list_short PARAMS ((struct pair_htable * table, |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
641 |
FILE * stream)); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
642 |
Index: b/lib/psgen.c |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
643 |
=================================================================== |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
644 |
--- a/lib/psgen.c |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
645 |
+++ b/lib/psgen.c |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
646 |
@@ -875,6 +875,7 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
647 |
print: |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
648 |
default: |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
649 |
{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
650 |
+ static mb_flag= 0; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
651 |
uchar buf[256]; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
652 |
int nchars; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
653 |
*buf = '\0'; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
654 |
@@ -889,6 +890,29 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
655 |
job->status->face_declared = false; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
656 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
657 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
658 |
+ if (c > 127 && encoding_get_composite_flag (job->encoding) && |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
659 |
+ job->status->face != Symbol) { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
660 |
+ if (mb_flag) { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
661 |
+ nchars = ps_escape_char (job, mb_flag, buf) + |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
662 |
+ ps_escape_char (job, c, buf); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
663 |
+ job->status->wx += char_composite_WX(job, c); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
664 |
+ job->status->column += nchars; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
665 |
+ if (line_full) { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
666 |
+ if (job->folding) { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
667 |
+ fold_line (job, new_face); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
668 |
+ job->status->column = nchars*2; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
669 |
+ job->status->wx = char_composite_WX(job, c); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
670 |
+ } else { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
671 |
+ job->status->is_in_cut = true; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
672 |
+ return; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
673 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
674 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
675 |
+ mb_flag = 0; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
676 |
+ } else { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
677 |
+ mb_flag = c; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
678 |
+ return; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
679 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
680 |
+ } else { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
681 |
nchars = ps_escape_char (job, c, buf); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
682 |
job->status->wx += char_WX (job, c); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
683 |
job->status->column += nchars; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
684 |
@@ -902,8 +926,9 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
685 |
return; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
686 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
687 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
688 |
+ } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
689 |
output (jdiv, "%s", buf); |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
690 |
- job->status->chars++; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
691 |
+ job->status->chars+=nchars; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
692 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
693 |
break; |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
694 |
} |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
695 |
Index: b/ps/base.ps |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
696 |
=================================================================== |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
697 |
--- a/ps/base.ps |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
698 |
+++ b/ps/base.ps |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
699 |
@@ -153,7 +153,11 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
700 |
% Return the y size of the current font |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
701 |
% - => fontsize |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
702 |
/currentfontsize { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
703 |
- currentfont /FontMatrix get 3 get 1000 mul |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
704 |
+ currentfont /FontType get 0 eq { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
705 |
+ currentfont /FontMatrix get 3 get |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
706 |
+ }{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
707 |
+ currentfont /FontMatrix get 3 get 1000 mul |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
708 |
+ } ifelse |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
709 |
} bind def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
710 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
711 |
% reencode the font |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
712 |
@@ -200,6 +204,144 @@ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
713 |
end |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
714 |
} bind def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
715 |
|
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
716 |
+% composite fonts for ASCII-EUC mixed strings |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
717 |
+% Version 1.2 1/31/1990 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
718 |
+% Original Ken'ichi HANDA ([email protected]) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
719 |
+% Modified Norio Katayama ([email protected]),1998 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
720 |
+% Extend & Fix Koji Nakamaru ([email protected]), 1999 |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
721 |
+% Anyone can freely copy, modify, distribute this program. |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
722 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
723 |
+/copyfont { % font-dic extra-entry-count copyfont font-dic |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
724 |
+ 1 index maxlength add dict begin |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
725 |
+ { 1 index /FID ne 2 index /UniqueID ne and |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
726 |
+ {def} {pop pop} ifelse |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
727 |
+ } forall |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
728 |
+ currentdict |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
729 |
+ end |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
730 |
+} bind def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
731 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
732 |
+/compositefont { % ASCIIFontName EUCFontName RomanScale RomanOffset Rot(T/F) compositefont font |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
733 |
+ /RomanRotation exch def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
734 |
+ /RomanOffset exch def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
735 |
+ /RomanScale exch def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
736 |
+ userdict /fixeucfont_dict known not { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
737 |
+ userdict begin |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
738 |
+ /fixeucfont_dict 2 dict begin |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
739 |
+ /UpperByteEncoding [ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
740 |
+ 16#00 1 16#20 { pop 0 } for |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
741 |
+ 16#21 1 16#28 { 16#20 sub } for |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
742 |
+ 16#29 1 16#2F { pop 0 } for |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
743 |
+ 16#30 1 16#74 { 16#27 sub } for |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
744 |
+ 16#75 1 16#FF { pop 0 } for |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
745 |
+ ] def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
746 |
+ /LowerByteEncoding [ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
747 |
+ 16#00 1 16#A0 { pop /.notdef } for |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
748 |
+ 16#A1 1 16#FE { 16#80 sub 16 2 string cvrs |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
749 |
+ (cXX) dup 1 4 -1 roll |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
750 |
+ putinterval cvn } for |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
751 |
+ /.notdef |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
752 |
+ ] def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
753 |
+ currentdict |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
754 |
+ end def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
755 |
+ end |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
756 |
+ } if |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
757 |
+ findfont dup /FontType get 0 eq { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
758 |
+ 14 dict begin |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
759 |
+ % |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
760 |
+ % 7+8 bit EUC font |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
761 |
+ % |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
762 |
+ 12 dict begin |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
763 |
+ /EUCFont exch def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
764 |
+ /FontInfo (7+8 bit EUC font) readonly def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
765 |
+ /PaintType 0 def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
766 |
+ /FontType 0 def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
767 |
+ /FontMatrix matrix def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
768 |
+ % /FontName |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
769 |
+ /Encoding fixeucfont_dict /UpperByteEncoding get def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
770 |
+ /FMapType 2 def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
771 |
+ EUCFont /WMode known |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
772 |
+ { EUCFont /WMode get /WMode exch def } |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
773 |
+ { /WMode 0 def } ifelse |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
774 |
+ /FDepVector [ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
775 |
+ EUCFont /FDepVector get 0 get |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
776 |
+ [ 16#21 1 16#28 {} for 16#30 1 16#74 {} for ] |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
777 |
+ { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
778 |
+ 13 dict begin |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
779 |
+ /EUCFont EUCFont def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
780 |
+ /UpperByte exch 16#80 add def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
781 |
+ % /FontName |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
782 |
+ /FontInfo (EUC lower byte font) readonly def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
783 |
+ /PaintType 0 def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
784 |
+ /FontType 3 def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
785 |
+ /FontMatrix matrix def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
786 |
+ /FontBBox {0 0 0 0} def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
787 |
+ /Encoding |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
788 |
+ fixeucfont_dict /LowerByteEncoding get def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
789 |
+ % /UniqueID |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
790 |
+ % /WMode |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
791 |
+ /BuildChar { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
792 |
+ gsave |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
793 |
+ exch dup /EUCFont get setfont |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
794 |
+ /UpperByte get |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
795 |
+ 2 string |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
796 |
+ dup 0 4 -1 roll put |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
797 |
+ dup 1 4 -1 roll put |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
798 |
+ dup stringwidth setcharwidth |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
799 |
+ 0 0 moveto show |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
800 |
+ grestore |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
801 |
+ } bind def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
802 |
+ currentdict |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
803 |
+ end |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
804 |
+ /lowerbytefont exch definefont |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
805 |
+ } forall |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
806 |
+ ] def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
807 |
+ currentdict |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
808 |
+ end |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
809 |
+ /eucfont exch definefont |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
810 |
+ exch |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
811 |
+ findfont 1 copyfont dup begin |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
812 |
+ RomanRotation { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
813 |
+ /FontMatrix FontMatrix |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
814 |
+ [ 0 RomanScale neg RomanScale 0 RomanOffset neg 0 ] |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
815 |
+ matrix concatmatrix def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
816 |
+ }{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
817 |
+ /FontMatrix FontMatrix |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
818 |
+ [ RomanScale 0 0 RomanScale 0 RomanOffset ] matrix concatmatrix |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
819 |
+ def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
820 |
+ /CDevProc |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
821 |
+ {pop pop pop pop 0 exch -1000 exch 2 div 880} def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
822 |
+ } ifelse |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
823 |
+ end |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
824 |
+ /asciifont exch definefont |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
825 |
+ exch |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
826 |
+ /FDepVector [ 4 2 roll ] def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
827 |
+ /FontType 0 def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
828 |
+ /WMode 0 def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
829 |
+ /FMapType 4 def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
830 |
+ /FontMatrix matrix def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
831 |
+ /Encoding [0 1] def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
832 |
+ /FontBBox {0 0 0 0} def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
833 |
+% /FontHeight 1.0 def % XXXX |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
834 |
+ /FontHeight RomanScale 1.0 ge { RomanScale }{ 1.0 } ifelse def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
835 |
+ /Descent -0.3 def % XXXX |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
836 |
+ currentdict |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
837 |
+ end |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
838 |
+ /tmpfont exch definefont |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
839 |
+ pop |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
840 |
+ /tmpfont findfont |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
841 |
+ }{ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
842 |
+ pop findfont 0 copyfont |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
843 |
+ } ifelse |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
844 |
+} def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
845 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
846 |
+/slantfont { % FontName slant-degree slantfont font' |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
847 |
+ exch findfont 1 copyfont begin |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
848 |
+ [ 1 0 4 -1 roll 1 0 0 ] FontMatrix exch matrix concatmatrix |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
849 |
+ /FontMatrix exch def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
850 |
+ currentdict |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
851 |
+ end |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
852 |
+} def |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
853 |
+ |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
854 |
% Function print line number (<string> # -) |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
855 |
/# { |
95d141a9085b
22834809 a2ps should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
856 |
gsave |