1 /*
2  * << H a r u free pdf library >> -- PdfFontDef_Symbol.cc
3  *
4  * Copyright (c) 1999-2003 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
5  *
6  * Permission to use, copy, modify, distribute and sell this software
7  * and its documentation for any purpose is hereby granted without fee,
8  * provided that the above copyright notice appear in all copies and
9  * that both that copyright notice and this permission notice appear
10  * in supporting documentation.
11  * It is provided "as is" without express or implied warranty.
12  *
13  */
14 
15 
16 #include "libharu.h"
17 
18 /*----- Symbol Font ---------------------------------------------------------*/
19 
PdfSymbolFontDef()20 PdfSymbolFontDef::PdfSymbolFontDef()
21     : PdfType1FontDef("Symbol")
22 {
23     const pdf_char_data_ro char_data[191] = {
24         {32, "space", 250},
25         {33, "exclam", 333},
26         {34, "universal", 713},
27         {35, "numbersign", 500},
28         {36, "existential", 549},
29         {37, "percent", 833},
30         {38, "ampersand", 778},
31         {39, "suchthat", 439},
32         {40, "parenleft", 333},
33         {41, "parenright", 333},
34         {42, "asteriskmath", 500},
35         {43, "plus", 549},
36         {44, "comma", 250},
37         {45, "minus", 549},
38         {46, "period", 250},
39         {47, "slash", 278},
40         {48, "zero", 500},
41         {49, "one", 500},
42         {50, "two", 500},
43         {51, "three", 500},
44         {52, "four", 500},
45         {53, "five", 500},
46         {54, "six", 500},
47         {55, "seven", 500},
48         {56, "eight", 500},
49         {57, "nine", 500},
50         {58, "colon", 278},
51         {59, "semicolon", 278},
52         {60, "less", 549},
53         {61, "equal", 549},
54         {62, "greater", 549},
55         {63, "question", 444},
56         {64, "congruent", 549},
57         {65, "Alpha", 722},
58         {66, "Beta", 667},
59         {67, "Chi", 722},
60         {68, "Delta", 612},
61         {69, "Epsilon", 611},
62         {70, "Phi", 763},
63         {71, "Gamma", 603},
64         {72, "Eta", 722},
65         {73, "Iota", 333},
66         {74, "theta1", 631},
67         {75, "Kappa", 722},
68         {76, "Lambda", 686},
69         {77, "Mu", 889},
70         {78, "Nu", 722},
71         {79, "Omicron", 722},
72         {80, "Pi", 768},
73         {81, "Theta", 741},
74         {82, "Rho", 556},
75         {83, "Sigma", 592},
76         {84, "Tau", 611},
77         {85, "Upsilon", 690},
78         {86, "sigma1", 439},
79         {87, "Omega", 768},
80         {88, "Xi", 645},
81         {89, "Psi", 795},
82         {90, "Zeta", 611},
83         {91, "bracketleft", 333},
84         {92, "therefore", 863},
85         {93, "bracketright", 333},
86         {94, "perpendicular", 658},
87         {95, "underscore", 500},
88         {96, "radicalex", 500},
89         {97, "alpha", 631},
90         {98, "beta", 549},
91         {99, "chi", 549},
92         {100, "delta", 494},
93         {101, "epsilon", 439},
94         {102, "phi", 521},
95         {103, "gamma", 411},
96         {104, "eta", 603},
97         {105, "iota", 329},
98         {106, "phi1", 603},
99         {107, "kappa", 549},
100         {108, "lambda", 549},
101         {109, "mu", 576},
102         {110, "nu", 521},
103         {111, "omicron", 549},
104         {112, "pi", 549},
105         {113, "theta", 521},
106         {114, "rho", 549},
107         {115, "sigma", 603},
108         {116, "tau", 439},
109         {117, "upsilon", 576},
110         {118, "omega1", 713},
111         {119, "omega", 686},
112         {120, "xi", 493},
113         {121, "psi", 686},
114         {122, "zeta", 494},
115         {123, "braceleft", 480},
116         {124, "bar", 200},
117         {125, "braceright", 480},
118         {126, "similar", 549},
119         {160, "Euro", 750},
120         {161, "Upsilon1", 620},
121         {162, "minute", 247},
122         {163, "lessequal", 549},
123         {164, "fraction", 167},
124         {165, "infinity", 713},
125         {166, "florin", 500},
126         {167, "club", 753},
127         {168, "diamond", 753},
128         {169, "heart", 753},
129         {170, "spade", 753},
130         {171, "arrowboth", 1042},
131         {172, "arrowleft", 987},
132         {173, "arrowup", 603},
133         {174, "arrowright", 987},
134         {175, "arrowdown", 603},
135         {176, "degree", 400},
136         {177, "plusminus", 549},
137         {178, "second", 411},
138         {179, "greaterequal", 549},
139         {180, "multiply", 549},
140         {181, "proportional", 713},
141         {182, "partialdiff", 494},
142         {183, "bullet", 460},
143         {184, "divide", 549},
144         {185, "notequal", 549},
145         {186, "equivalence", 549},
146         {187, "approxequal", 549},
147         {188, "ellipsis", 1000},
148         {189, "arrowvertex", 603},
149         {190, "arrowhorizex", 1000},
150         {191, "carriagereturn", 658},
151         {192, "aleph", 823},
152         {193, "Ifraktur", 686},
153         {194, "Rfraktur", 795},
154         {195, "weierstrass", 987},
155         {196, "circlemultiply", 768},
156         {197, "circleplus", 768},
157         {198, "emptyset", 823},
158         {199, "intersection", 768},
159         {200, "union", 768},
160         {201, "propersuperset", 713},
161         {202, "reflexsuperset", 713},
162         {203, "notsubset", 713},
163         {204, "propersubset", 713},
164         {205, "reflexsubset", 713},
165         {206, "element", 713},
166         {207, "notelement", 713},
167         {208, "angle", 768},
168         {209, "gradient", 713},
169         {210, "registerserif", 790},
170         {211, "copyrightserif", 790},
171         {212, "trademarkserif", 890},
172         {213, "product", 823},
173         {214, "radical", 549},
174         {215, "dotmath", 250},
175         {216, "logicalnot", 713},
176         {217, "logicaland", 603},
177         {218, "logicalor", 603},
178         {219, "arrowdblboth", 1042},
179         {220, "arrowdblleft", 987},
180         {221, "arrowdblup", 603},
181         {222, "arrowdblright", 987},
182         {223, "arrowdbldown", 603},
183         {224, "lozenge", 494},
184         {225, "angleleft", 329},
185         {226, "registersans", 790},
186         {227, "copyrightsans", 790},
187         {228, "trademarksans", 786},
188         {229, "summation", 713},
189         {230, "parenlefttp", 384},
190         {231, "parenleftex", 384},
191         {232, "parenleftbt", 384},
192         {233, "bracketlefttp", 384},
193         {234, "bracketleftex", 384},
194         {235, "bracketleftbt", 384},
195         {236, "bracelefttp", 494},
196         {237, "braceleftmid", 494},
197         {238, "braceleftbt", 494},
198         {239, "braceex", 494},
199         {241, "angleright", 329},
200         {242, "integral", 274},
201         {243, "integraltp", 686},
202         {244, "integralex", 686},
203         {245, "integralbt", 686},
204         {246, "parenrighttp", 384},
205         {247, "parenrightex", 384},
206         {248, "parenrightbt", 384},
207         {249, "bracketrighttp", 384},
208         {250, "bracketrightex", 384},
209         {251, "bracketrightbt", 384},
210         {252, "bracerighttp", 494},
211         {253, "bracerightmid", 494},
212         {254, "bracerightbt", 494},
213         {-1, "apple", 790},
214         {-1, NULL, 0}
215     };
216     fFontBBox.left = -180;
217     fFontBBox.top = -293;
218     fFontBBox.right = 1090;
219     fFontBBox.bottom = 1010;
220     fAscent = 0;
221     fDescent =0;
222     fXHeight = 0;
223     fIsBase14Font = true;
224     fDefaultEncoding = PDF_FONT_SPECIFIC;
225     fFirstChar = 32;
226     fLastChar = 254;
227 
228     SetWidths(char_data);
229 }
230 
231 /*---------------------------------------------------------------------------*/
232 /*------ PdfSymbolFontEncoding -----------------------------------------------*/
233 
PdfSymbolFontEncoding()234 PdfSymbolFontEncoding::PdfSymbolFontEncoding()
235 {
236     fFirstChar = 32;
237     fLastChar = 254;
238     fBaseEncoding = PDF_FONT_SPECIFIC;
239 }
240 
241 /*----------------------------------------------------------------------------*/
242 
243