LibreOffice Module vcl (master) 1
pdfbuildin_fonts.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <sal/config.h>
21
22#include <rtl/strbuf.hxx>
23
25
26namespace vcl::pdf
27{
29{
30 OStringBuffer aBuf(16);
31 aBuf.append('/');
32 const char* pRun = m_pPSName;
33
34 unsigned int nCopied = 0;
35 while (*pRun)
36 {
37 if (*pRun >= 'A' && *pRun <= 'Z')
38 nCopied = 0;
39 if (nCopied++ < 2)
40 aBuf.append(*pRun);
41 pRun++;
42 }
43 return aBuf.makeStringAndClear();
44}
45
47{
48 assert(false && "pdf::BuildinFont doesn't provide correct char maps!");
49 if (m_xFontCharMap.is())
50 return m_xFontCharMap;
51
52 m_xFontCharMap = FontCharMap::GetDefaultMap(m_eCharSet != RTL_TEXTENCODING_MS_1252);
53 return m_xFontCharMap;
54}
55
57{
58 FontAttributes aDFA;
59 aDFA.SetFamilyName(OUString::createFromAscii(m_pName));
60 aDFA.SetStyleName(OUString::createFromAscii(m_pStyleName));
62 // dubious, see BuildinFont::GetFontCharMap
63 aDFA.SetMicrosoftSymbolEncoded(m_eCharSet != RTL_TEXTENCODING_MS_1252);
64 aDFA.SetPitch(m_ePitch);
65 aDFA.SetWeight(m_eWeight);
66 aDFA.SetItalic(m_eItalic);
68 aDFA.SetQuality(50000);
69 return aDFA;
70}
71
73 = { { "Courier", // family name
74 "Normal", // style
75 "Courier", // PSName
76 629,
77 -157, // ascend, descend
78 FAMILY_MODERN, // family style
79 RTL_TEXTENCODING_MS_1252, // charset
80 PITCH_FIXED, // pitch
81 WIDTH_NORMAL, // width type
82 WEIGHT_NORMAL, // weight type
83 ITALIC_NONE, // italic type
84 {
85 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
86 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
87 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
88 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
89 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39
90 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47
91 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55
92 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63
93 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71
94 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79
95 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87
96 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95
97 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103
98 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111
99 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119
100 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127
101 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135
102 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143
103 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151
104 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159
105 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167
106 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175
107 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183
108 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191
109 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199
110 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207
111 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215
112 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223
113 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231
114 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239
115 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247
116 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255
117 },
118 nullptr },
119
120 { "Courier", // family name
121 "Italic", // style
122 "Courier-Oblique", // PSName
123 629,
124 -157, // ascend, descend
125 FAMILY_MODERN, // family style
126 RTL_TEXTENCODING_MS_1252, // charset
127 PITCH_FIXED, // pitch
128 WIDTH_NORMAL, // width type
129 WEIGHT_NORMAL, // weight type
130 ITALIC_NORMAL, // italic type
131 {
132 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
133 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
134 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
135 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
136 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39
137 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47
138 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55
139 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63
140 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71
141 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79
142 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87
143 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95
144 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103
145 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111
146 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119
147 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127
148 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135
149 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143
150 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151
151 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159
152 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167
153 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175
154 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183
155 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191
156 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199
157 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207
158 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215
159 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223
160 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231
161 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239
162 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247
163 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255
164 },
165 nullptr },
166
167 { "Courier", // family name
168 "Bold", // style
169 "Courier-Bold", // PSName
170 629,
171 -157, // ascend, descend
172 FAMILY_MODERN, // family style
173 RTL_TEXTENCODING_MS_1252, // charset
174 PITCH_FIXED, // pitch
175 WIDTH_NORMAL, // width type
176 WEIGHT_BOLD, // weight type
177 ITALIC_NONE, // italic type
178 {
179 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
180 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
181 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
182 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
183 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39
184 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47
185 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55
186 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63
187 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71
188 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79
189 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87
190 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95
191 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103
192 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111
193 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119
194 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127
195 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135
196 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143
197 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151
198 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159
199 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167
200 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175
201 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183
202 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191
203 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199
204 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207
205 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215
206 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223
207 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231
208 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239
209 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247
210 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255
211 },
212 nullptr },
213
214 { "Courier", // family name
215 "Bold Italic", // style
216 "Courier-BoldOblique", // PSName
217 629,
218 -157, // ascend, descend
219 FAMILY_MODERN, // family style
220 RTL_TEXTENCODING_MS_1252, // charset
221 PITCH_FIXED, // pitch
222 WIDTH_NORMAL, // width type
223 WEIGHT_BOLD, // weight type
224 ITALIC_NORMAL, // italic type
225 {
226 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
227 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
228 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
229 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
230 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39
231 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47
232 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55
233 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63
234 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71
235 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79
236 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87
237 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95
238 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103
239 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111
240 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119
241 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127
242 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135
243 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143
244 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151
245 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159
246 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167
247 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175
248 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183
249 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191
250 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199
251 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207
252 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215
253 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223
254 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231
255 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239
256 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247
257 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255
258 },
259 nullptr },
260
261 { "Helvetica", // family name
262 "Normal", // style
263 "Helvetica", // PSName
264 718,
265 -207, // ascend, descend
266 FAMILY_SWISS, // family style
267 RTL_TEXTENCODING_MS_1252, // charset
268 PITCH_VARIABLE, // pitch
269 WIDTH_NORMAL, // width type
270 WEIGHT_NORMAL, // weight type
271 ITALIC_NONE, // italic type
272 {
273 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
274 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
275 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
276 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
277 278, 278, 355, 556, 556, 889, 667, 191, // 32 - 39
278 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47
279 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55
280 556, 556, 278, 278, 584, 584, 584, 556, // 56 - 63
281 1015, 667, 667, 722, 722, 667, 611, 778, // 64 - 71
282 722, 278, 500, 667, 556, 833, 722, 778, // 72 - 79
283 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87
284 667, 667, 611, 278, 278, 278, 469, 556, // 88 - 95
285 333, 556, 556, 500, 556, 556, 278, 556, // 96 - 103
286 556, 222, 222, 500, 222, 833, 556, 556, // 104 - 111
287 556, 556, 333, 500, 278, 556, 500, 722, // 112 - 119
288 500, 500, 500, 334, 260, 334, 584, 0, // 120 - 127
289 556, 0, 222, 556, 333, 1000, 556, 556, // 128 - 135
290 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143
291 0, 222, 222, 333, 333, 350, 556, 1000, // 144 - 151
292 333, 1000, 500, 333, 944, 0, 500, 667, // 152 - 159
293 278, 333, 556, 556, 556, 556, 260, 556, // 160 - 167
294 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175
295 400, 584, 333, 333, 333, 556, 537, 278, // 176 - 183
296 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191
297 667, 667, 667, 667, 667, 667, 1000, 722, // 192 - 199
298 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207
299 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215
300 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223
301 556, 556, 556, 556, 556, 556, 889, 500, // 224 - 231
302 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239
303 556, 556, 556, 556, 556, 556, 556, 584, // 240 - 247
304 611, 556, 556, 556, 556, 500, 556, 500 // 248 - 255
305 },
306 nullptr },
307
308 { "Helvetica", // family name
309 "Italic", // style
310 "Helvetica-Oblique", // PSName
311 718,
312 -207, // ascend, descend
313 FAMILY_SWISS, // family style
314 RTL_TEXTENCODING_MS_1252, // charset
315 PITCH_VARIABLE, // pitch
316 WIDTH_NORMAL, // width type
317 WEIGHT_NORMAL, // weight type
318 ITALIC_NORMAL, // italic type
319 {
320 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
321 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
322 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
323 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
324 278, 278, 355, 556, 556, 889, 667, 191, // 32 - 39
325 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47
326 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55
327 556, 556, 278, 278, 584, 584, 584, 556, // 56 - 63
328 1015, 667, 667, 722, 722, 667, 611, 778, // 64 - 71
329 722, 278, 500, 667, 556, 833, 722, 778, // 72 - 79
330 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87
331 667, 667, 611, 278, 278, 278, 469, 556, // 88 - 95
332 333, 556, 556, 500, 556, 556, 278, 556, // 96 - 103
333 556, 222, 222, 500, 222, 833, 556, 556, // 104 - 111
334 556, 556, 333, 500, 278, 556, 500, 722, // 112 - 119
335 500, 500, 500, 334, 260, 334, 584, 0, // 120 - 127
336 556, 0, 222, 556, 333, 1000, 556, 556, // 128 - 135
337 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143
338 0, 222, 222, 333, 333, 350, 556, 1000, // 144 - 151
339 333, 1000, 500, 333, 944, 0, 500, 667, // 152 - 159
340 278, 333, 556, 556, 556, 556, 260, 556, // 160 - 167
341 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175
342 400, 584, 333, 333, 333, 556, 537, 278, // 176 - 183
343 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191
344 667, 667, 667, 667, 667, 667, 1000, 722, // 192 - 199
345 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207
346 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215
347 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223
348 556, 556, 556, 556, 556, 556, 889, 500, // 224 - 231
349 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239
350 556, 556, 556, 556, 556, 556, 556, 584, // 240 - 247
351 611, 556, 556, 556, 556, 500, 556, 500 // 248 - 255
352 },
353 nullptr },
354
355 { "Helvetica", // family name
356 "Bold", // style
357 "Helvetica-Bold", // PSName
358 718,
359 -207, // ascend, descend
360 FAMILY_SWISS, // family style
361 RTL_TEXTENCODING_MS_1252, // charset
362 PITCH_VARIABLE, // pitch
363 WIDTH_NORMAL, // width type
364 WEIGHT_BOLD, // weight type
365 ITALIC_NONE, // italic type
366 {
367 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
368 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
369 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
370 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
371 278, 333, 474, 556, 556, 889, 722, 238, // 32 - 39
372 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47
373 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55
374 556, 556, 333, 333, 584, 584, 584, 611, // 56 - 63
375 975, 722, 722, 722, 722, 667, 611, 778, // 64 - 71
376 722, 278, 556, 722, 611, 833, 722, 778, // 72 - 79
377 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87
378 667, 667, 611, 333, 278, 333, 584, 556, // 88 - 95
379 333, 556, 611, 556, 611, 556, 333, 611, // 96 - 103
380 611, 278, 278, 556, 278, 889, 611, 611, // 104 - 111
381 611, 611, 389, 556, 333, 611, 556, 778, // 112 - 119
382 556, 556, 500, 389, 280, 389, 584, 0, // 120 - 127
383 556, 0, 278, 556, 500, 1000, 556, 556, // 128 - 135
384 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143
385 0, 278, 278, 500, 500, 350, 556, 1000, // 144 - 151
386 333, 1000, 556, 333, 944, 0, 500, 667, // 152 - 159
387 278, 333, 556, 556, 556, 556, 280, 556, // 160 - 167
388 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175
389 400, 584, 333, 333, 333, 611, 556, 278, // 176 - 183
390 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191
391 722, 722, 722, 722, 722, 722, 1000, 722, // 192 - 199
392 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207
393 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215
394 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223
395 556, 556, 556, 556, 556, 556, 889, 556, // 224 - 231
396 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239
397 611, 611, 611, 611, 611, 611, 611, 584, // 240 - 247
398 611, 611, 611, 611, 611, 556, 611, 556 // 248 - 255
399 },
400 nullptr },
401
402 { "Helvetica", // family name
403 "Bold Italic", // style
404 "Helvetica-BoldOblique", // PSName
405 718,
406 -207, // ascend, descend
407 FAMILY_SWISS, // family style
408 RTL_TEXTENCODING_MS_1252, // charset
409 PITCH_VARIABLE, // pitch
410 WIDTH_NORMAL, // width type
411 WEIGHT_BOLD, // weight type
412 ITALIC_NORMAL, // italic type
413 {
414 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
415 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
416 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
417 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
418 278, 333, 474, 556, 556, 889, 722, 238, // 32 - 39
419 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47
420 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55
421 556, 556, 333, 333, 584, 584, 584, 611, // 56 - 63
422 975, 722, 722, 722, 722, 667, 611, 778, // 64 - 71
423 722, 278, 556, 722, 611, 833, 722, 778, // 72 - 79
424 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87
425 667, 667, 611, 333, 278, 333, 584, 556, // 88 - 95
426 333, 556, 611, 556, 611, 556, 333, 611, // 96 - 103
427 611, 278, 278, 556, 278, 889, 611, 611, // 104 - 111
428 611, 611, 389, 556, 333, 611, 556, 778, // 112 - 119
429 556, 556, 500, 389, 280, 389, 584, 0, // 120 - 127
430 556, 0, 278, 556, 500, 1000, 556, 556, // 128 - 135
431 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143
432 0, 278, 278, 500, 500, 350, 556, 1000, // 144 - 151
433 333, 1000, 556, 333, 944, 0, 500, 667, // 152 - 159
434 278, 333, 556, 556, 556, 556, 280, 556, // 160 - 167
435 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175
436 400, 584, 333, 333, 333, 611, 556, 278, // 176 - 183
437 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191
438 722, 722, 722, 722, 722, 722, 1000, 722, // 192 - 199
439 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207
440 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215
441 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223
442 556, 556, 556, 556, 556, 556, 889, 556, // 224 - 231
443 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239
444 611, 611, 611, 611, 611, 611, 611, 584, // 240 - 247
445 611, 611, 611, 611, 611, 556, 611, 556 // 248 - 255
446 },
447 nullptr },
448
449 { "Times", // family name
450 "Normal", // style
451 "Times-Roman", // PSName
452 683,
453 -217, // ascend, descend
454 FAMILY_ROMAN, // family style
455 RTL_TEXTENCODING_MS_1252, // charset
456 PITCH_VARIABLE, // pitch
457 WIDTH_NORMAL, // width type
458 WEIGHT_NORMAL, // weight type
459 ITALIC_NONE, // italic type
460 {
461 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
462 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
463 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
464 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
465 250, 333, 408, 500, 500, 833, 778, 180, // 32 - 39
466 333, 333, 500, 564, 250, 333, 250, 278, // 40 - 47
467 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55
468 500, 500, 278, 278, 564, 564, 564, 444, // 56 - 63
469 921, 722, 667, 667, 722, 611, 556, 722, // 64 - 71
470 722, 333, 389, 722, 611, 889, 722, 722, // 72 - 79
471 556, 722, 667, 556, 611, 722, 722, 944, // 80 - 87
472 722, 722, 611, 333, 278, 333, 469, 500, // 88 - 95
473 333, 444, 500, 444, 500, 444, 333, 500, // 96 - 103
474 500, 278, 278, 500, 278, 778, 500, 500, // 104 - 111
475 500, 500, 333, 389, 278, 500, 500, 722, // 112 - 119
476 500, 500, 444, 480, 200, 480, 541, 0, // 120 - 127
477 500, 0, 333, 500, 444, 1000, 500, 500, // 128 - 135
478 333, 1000, 556, 333, 889, 0, 444, 0, // 136 - 143
479 0, 333, 333, 444, 444, 350, 500, 1000, // 144 - 151
480 333, 980, 389, 333, 722, 0, 444, 722, // 152 - 159
481 250, 333, 500, 500, 500, 500, 200, 500, // 160 - 167
482 333, 760, 276, 500, 564, 333, 760, 333, // 168 - 175
483 400, 564, 300, 300, 333, 500, 453, 250, // 176 - 183
484 333, 300, 310, 500, 750, 750, 750, 444, // 184 - 191
485 722, 722, 722, 722, 722, 722, 889, 667, // 192 - 199
486 611, 611, 611, 611, 333, 333, 333, 333, // 200 - 207
487 722, 722, 722, 722, 722, 722, 722, 564, // 208 - 215
488 722, 722, 722, 722, 722, 722, 556, 500, // 216 - 223
489 444, 444, 444, 444, 444, 444, 667, 444, // 224 - 231
490 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239
491 500, 500, 500, 500, 500, 500, 500, 564, // 240 - 247
492 500, 500, 500, 500, 500, 500, 500, 500 // 248 - 255
493 },
494 nullptr },
495
496 { "Times", // family name
497 "Italic", // style
498 "Times-Italic", // PSName
499 683,
500 -217, // ascend, descend
501 FAMILY_ROMAN, // family style
502 RTL_TEXTENCODING_MS_1252, // charset
503 PITCH_VARIABLE, // pitch
504 WIDTH_NORMAL, // width type
505 WEIGHT_NORMAL, // weight type
506 ITALIC_NORMAL, // italic type
507 {
508 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
509 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
510 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
511 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
512 250, 333, 420, 500, 500, 833, 778, 214, // 32 - 39
513 333, 333, 500, 675, 250, 333, 250, 278, // 40 - 47
514 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55
515 500, 500, 333, 333, 675, 675, 675, 500, // 56 - 63
516 920, 611, 611, 667, 722, 611, 611, 722, // 64 - 71
517 722, 333, 444, 667, 556, 833, 667, 722, // 72 - 79
518 611, 722, 611, 500, 556, 722, 611, 833, // 80 - 87
519 611, 556, 556, 389, 278, 389, 422, 500, // 88 - 95
520 333, 500, 500, 444, 500, 444, 278, 500, // 96 - 103
521 500, 278, 278, 444, 278, 722, 500, 500, // 104 - 111
522 500, 500, 389, 389, 278, 500, 444, 667, // 112 - 119
523 444, 444, 389, 400, 275, 400, 541, 0, // 120 - 127
524 500, 0, 333, 500, 556, 889, 500, 500, // 128 - 135
525 333, 1000, 500, 333, 944, 0, 389, 0, // 136 - 143
526 0, 333, 333, 556, 556, 350, 500, 889, // 144 - 151
527 333, 980, 389, 333, 667, 0, 389, 556, // 152 - 159
528 250, 389, 500, 500, 500, 500, 275, 500, // 160 - 167
529 333, 760, 276, 500, 675, 333, 760, 333, // 168 - 175
530 400, 675, 300, 300, 333, 500, 523, 250, // 176 - 183
531 333, 300, 310, 500, 750, 750, 750, 500, // 184 - 191
532 611, 611, 611, 611, 611, 611, 889, 667, // 192 - 199
533 611, 611, 611, 611, 333, 333, 333, 333, // 200 - 207
534 722, 667, 722, 722, 722, 722, 722, 675, // 208 - 215
535 722, 722, 722, 722, 722, 556, 611, 500, // 216 - 223
536 500, 500, 500, 500, 500, 500, 667, 444, // 224 - 231
537 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239
538 500, 500, 500, 500, 500, 500, 500, 675, // 240 - 247
539 500, 500, 500, 500, 500, 444, 500, 444 // 248 - 255
540 },
541 nullptr },
542
543 { "Times", // family name
544 "Bold", // style
545 "Times-Bold", // PSName
546 683,
547 -217, // ascend, descend
548 FAMILY_ROMAN, // family style
549 RTL_TEXTENCODING_MS_1252, // charset
550 PITCH_VARIABLE, // pitch
551 WIDTH_NORMAL, // width type
552 WEIGHT_BOLD, // weight type
553 ITALIC_NONE, // italic type
554 {
555 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
556 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
557 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
558 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
559 250, 333, 555, 500, 500, 1000, 833, 278, // 32 - 39
560 333, 333, 500, 570, 250, 333, 250, 278, // 40 - 47
561 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55
562 500, 500, 333, 333, 570, 570, 570, 500, // 56 - 63
563 930, 722, 667, 722, 722, 667, 611, 778, // 64 - 71
564 778, 389, 500, 778, 667, 944, 722, 778, // 72 - 79
565 611, 778, 722, 556, 667, 722, 722, 1000, // 80 - 87
566 722, 722, 667, 333, 278, 333, 581, 500, // 88 - 95
567 333, 500, 556, 444, 556, 444, 333, 500, // 96 - 103
568 556, 278, 333, 556, 278, 833, 556, 500, // 104 - 111
569 556, 556, 444, 389, 333, 556, 500, 722, // 112 - 119
570 500, 500, 444, 394, 220, 394, 520, 0, // 120 - 127
571 500, 0, 333, 500, 500, 1000, 500, 500, // 128 - 135
572 333, 1000, 556, 333, 1000, 0, 444, 0, // 136 - 143
573 0, 333, 333, 500, 500, 350, 500, 1000, // 144 - 151
574 333, 1000, 389, 333, 722, 0, 444, 722, // 152 - 159
575 250, 333, 500, 500, 500, 500, 220, 500, // 160 - 167
576 333, 747, 300, 500, 570, 333, 747, 333, // 168 - 175
577 400, 570, 300, 300, 333, 556, 540, 250, // 176 - 183
578 333, 300, 330, 500, 750, 750, 750, 500, // 184 - 191
579 722, 722, 722, 722, 722, 722, 1000, 722, // 192 - 199
580 667, 667, 667, 667, 389, 389, 389, 389, // 200 - 207
581 722, 722, 778, 778, 778, 778, 778, 570, // 208 - 215
582 778, 722, 722, 722, 722, 722, 611, 556, // 216 - 223
583 500, 500, 500, 500, 500, 500, 722, 444, // 224 - 231
584 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239
585 500, 556, 500, 500, 500, 500, 500, 570, // 240 - 247
586 500, 556, 556, 556, 556, 500, 556, 500 // 248 - 255
587 },
588 nullptr },
589
590 { "Times", // family name
591 "Bold Italic", // style
592 "Times-BoldItalic", // PSName
593 683,
594 -217, // ascend, descend
595 FAMILY_ROMAN, // family style
596 RTL_TEXTENCODING_MS_1252, // charset
597 PITCH_VARIABLE, // pitch
598 WIDTH_NORMAL, // width type
599 WEIGHT_BOLD, // weight type
600 ITALIC_NORMAL, // italic type
601 {
602 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
603 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
604 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
605 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
606 250, 389, 555, 500, 500, 833, 778, 278, // 32 - 39
607 333, 333, 500, 570, 250, 333, 250, 278, // 40 - 47
608 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55
609 500, 500, 333, 333, 570, 570, 570, 500, // 56 - 63
610 832, 667, 667, 667, 722, 667, 667, 722, // 64 - 71
611 778, 389, 500, 667, 611, 889, 722, 722, // 72 - 79
612 611, 722, 667, 556, 611, 722, 667, 889, // 80 - 87
613 667, 611, 611, 333, 278, 333, 570, 500, // 88 - 95
614 333, 500, 500, 444, 500, 444, 333, 500, // 96 - 103
615 556, 278, 278, 500, 278, 778, 556, 500, // 104 - 111
616 500, 500, 389, 389, 278, 556, 444, 667, // 112 - 119
617 500, 444, 389, 348, 220, 348, 570, 0, // 120 - 127
618 500, 0, 333, 500, 500, 1000, 500, 500, // 128 - 135
619 333, 1000, 556, 333, 944, 0, 389, 0, // 136 - 143
620 0, 333, 333, 500, 500, 350, 500, 1000, // 144 - 151
621 333, 1000, 389, 333, 722, 0, 389, 611, // 152 - 159
622 250, 389, 500, 500, 500, 500, 220, 500, // 160 - 167
623 333, 747, 266, 500, 606, 333, 747, 333, // 168 - 175
624 400, 570, 300, 300, 333, 576, 500, 250, // 176 - 183
625 333, 300, 300, 500, 750, 750, 750, 500, // 184 - 191
626 667, 667, 667, 667, 667, 667, 944, 667, // 192 - 199
627 667, 667, 667, 667, 389, 389, 389, 389, // 200 - 207
628 722, 722, 722, 722, 722, 722, 722, 570, // 208 - 215
629 722, 722, 722, 722, 722, 611, 611, 500, // 216 - 223
630 500, 500, 500, 500, 500, 500, 722, 444, // 224 - 231
631 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239
632 500, 556, 500, 500, 500, 500, 500, 570, // 240 - 247
633 500, 556, 556, 556, 556, 444, 500, 444 // 248 - 255
634 },
635 nullptr },
636
637 // The font name "Symbol" is too generic and causes plenty of trouble.
638 // To ensure WYSIWIG the PDF-Base14 variant gets a not-confusable name
639 { "PDF_Base14_Symbol", // family name
640 "Normal", // style
641 "Symbol", // PSName
642 1010,
643 -293, // ascend, descend
644 FAMILY_DONTKNOW, // family style
645 RTL_TEXTENCODING_ADOBE_SYMBOL, // charset
646 PITCH_VARIABLE, // pitch
647 WIDTH_NORMAL, // width type
648 WEIGHT_NORMAL, // weight type
649 ITALIC_NONE, // italic type
650 {
651 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
652 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
653 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
654 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
655 250, 333, 713, 500, 549, 833, 778, 439, // 32 - 39
656 333, 333, 500, 549, 250, 549, 250, 278, // 40 - 47
657 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55
658 500, 500, 278, 278, 549, 549, 549, 444, // 56 - 63
659 549, 722, 667, 722, 612, 611, 763, 603, // 64 - 71
660 722, 333, 631, 722, 686, 889, 722, 722, // 72 - 79
661 768, 741, 556, 592, 611, 690, 439, 768, // 80 - 87
662 645, 795, 611, 333, 863, 333, 658, 500, // 88 - 95
663 500, 631, 549, 549, 494, 439, 521, 411, // 96 - 103
664 603, 329, 603, 549, 549, 576, 521, 549, // 104 - 111
665 549, 521, 549, 603, 439, 576, 713, 686, // 112 - 119
666 493, 686, 494, 480, 200, 480, 549, 0, // 120 - 127
667 0, 0, 0, 0, 0, 0, 0, 0, // 128 - 135
668 0, 0, 0, 0, 0, 0, 0, 0, // 136 - 143
669 0, 0, 0, 0, 0, 0, 0, 0, // 144 - 151
670 0, 0, 0, 0, 0, 0, 0, 0, // 152 - 159
671 750, 620, 247, 549, 167, 713, 500, 753, // 160 - 167
672 753, 753, 753, 1042, 987, 603, 987, 603, // 168 - 175
673 400, 549, 411, 549, 549, 713, 494, 460, // 176 - 183
674 549, 549, 549, 549, 1000, 603, 1000, 658, // 184 - 191
675 823, 686, 795, 987, 768, 768, 823, 768, // 192 - 199
676 768, 713, 713, 713, 713, 713, 713, 713, // 200 - 207
677 768, 713, 790, 790, 890, 823, 549, 250, // 208 - 215
678 713, 603, 603, 1042, 987, 603, 987, 603, // 216 - 223
679 494, 329, 790, 790, 786, 713, 384, 384, // 224 - 231
680 384, 384, 384, 384, 494, 494, 494, 494, // 232 - 239
681 0, 329, 274, 686, 686, 686, 384, 384, // 240 - 247
682 384, 384, 384, 384, 494, 494, 494, 0 // 248 - 255
683 },
684 nullptr },
685
686 { "ZapfDingbats", // family name
687 "Normal", // style
688 "ZapfDingbats", // PSName
689 820,
690 -143, // ascend, descend
691 FAMILY_DONTKNOW, // family style
692 RTL_TEXTENCODING_ADOBE_DINGBATS, // charset
693 PITCH_VARIABLE, // pitch
694 WIDTH_NORMAL, // width type
695 WEIGHT_NORMAL, // weight type
696 ITALIC_NONE, // italic type
697 {
698 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7
699 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15
700 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23
701 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31
702 278, 974, 961, 974, 980, 719, 789, 790, // 32 - 39
703 791, 690, 960, 939, 549, 855, 911, 933, // 40 - 47
704 911, 945, 974, 755, 846, 762, 761, 571, // 48 - 55
705 677, 763, 760, 759, 754, 494, 552, 537, // 56 - 63
706 577, 692, 786, 788, 788, 790, 793, 794, // 64 - 71
707 816, 823, 789, 841, 823, 833, 816, 831, // 72 - 79
708 923, 744, 723, 749, 790, 792, 695, 776, // 80 - 87
709 768, 792, 759, 707, 708, 682, 701, 826, // 88 - 95
710 815, 789, 789, 707, 687, 696, 689, 786, // 96 - 103
711 787, 713, 791, 785, 791, 873, 761, 762, // 104 - 111
712 762, 759, 759, 892, 892, 788, 784, 438, // 112 - 119
713 138, 277, 415, 392, 392, 668, 668, 0, // 120 - 127
714 390, 390, 317, 317, 276, 276, 509, 509, // 128 - 135
715 410, 410, 234, 234, 334, 334, 0, 0, // 136 - 143
716 0, 0, 0, 0, 0, 0, 0, 0, // 144 - 151
717 0, 0, 0, 0, 0, 0, 0, 0, // 152 - 159
718 0, 732, 544, 544, 910, 667, 760, 760, // 160 - 167
719 776, 595, 694, 626, 788, 788, 788, 788, // 168 - 175
720 788, 788, 788, 788, 788, 788, 788, 788, // 176 - 183
721 788, 788, 788, 788, 788, 788, 788, 788, // 184 - 191
722 788, 788, 788, 788, 788, 788, 788, 788, // 192 - 199
723 788, 788, 788, 788, 788, 788, 788, 788, // 200 - 207
724 788, 788, 788, 788, 894, 838, 1016, 458, // 208 - 215
725 748, 924, 748, 918, 927, 928, 928, 834, // 216 - 223
726 873, 828, 924, 924, 917, 930, 931, 463, // 224 - 231
727 883, 836, 836, 867, 867, 696, 696, 874, // 232 - 239
728 0, 874, 760, 946, 771, 865, 771, 888, // 240 - 247
729 967, 888, 831, 873, 927, 970, 918, 0 // 248 - 255
730 },
731 nullptr }
732
733 };
734
737 : LogicalFontInstance(rFontFace, rFSP)
738{
739}
740
742{
743 return false;
744}
745
747{
748 return false;
749}
750
752 : vcl::font::PhysicalFontFace(m_aBuildinFonts[nId].GetFontAttributes())
753 , mrBuildin(m_aBuildinFonts[nId])
754{
755}
756
759{
760 return new BuildinFontInstance(*this, rFSP);
761}
762
763} // namespace vcl::pdf
764
765/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetPitch(const FontPitch ePitch)
void SetFamilyType(const FontFamily eFontFamily)
void SetItalic(const FontItalic eItalic)
void SetMicrosoftSymbolEncoded(const bool)
void SetWeight(const FontWeight eWeight)
void SetStyleName(const OUString &sStyleName)
void SetWidthType(const FontWidth eWidthType)
void SetFamilyName(const OUString &sFamilyName)
void SetQuality(int nQuality)
static FontCharMapRef GetDefaultMap(bool bMicrosoftSymbolMap)
Get the default font character map.
bool is() const
abstract base class for physical font faces
rtl::Reference< LogicalFontInstance > CreateFontInstance(const vcl::font::FontSelectPattern &rFSD) const override
static const BuildinFont m_aBuildinFonts[14]
bool GetGlyphOutline(sal_GlyphId nId, basegfx::B2DPolyPolygon &rPoly, bool) const override
BuildinFontInstance(const vcl::font::PhysicalFontFace &, const vcl::font::FontSelectPattern &)
bool ImplGetGlyphBoundRect(sal_GlyphId nID, tools::Rectangle &rRect, bool) const override
PITCH_VARIABLE
PITCH_FIXED
ITALIC_NORMAL
ITALIC_NONE
WIDTH_NORMAL
FAMILY_DONTKNOW
FAMILY_SWISS
FAMILY_MODERN
FAMILY_ROMAN
WEIGHT_BOLD
WEIGHT_NORMAL
uint32_t sal_GlyphId
Definition: glyphid.hxx:24
aBuf
sal_Int16 nId
FontCharMapRef m_xFontCharMap
FontFamily const m_eFamily
const FontCharMapRef & GetFontCharMap() const
FontWidth const m_eWidthType
FontItalic const m_eItalic
rtl_TextEncoding const m_eCharSet
OString getNameObject() const
FontAttributes GetFontAttributes() const
FontPitch const m_ePitch
FontWeight const m_eWeight