Coverage Report

Created: 2026-10-14 09:33

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