Skip to content

Commit ee88234

Browse files
authored
Deserialization rewrite & more rendering operations (#11)
- Get this file (mostly) rendering: https://commons.wikimedia.org/wiki/File:Test.pdf - Adds support for form xobjects - Rewrite of the deserialization system - Now uses typed arena vectors - Uses pointers and macro-generated functions instead of copying into field offsets (slightly safer).
1 parent 03e914e commit ee88234

119 files changed

Lines changed: 6595 additions & 2984 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/clang-format.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fetch-depth: 2
1616
- uses: jayllyz/clang-format-action@v1
1717
with:
18-
clang-version: 17
18+
clang-version: 21
1919
- name: Commit changes
2020
uses: stefanzweifel/git-auto-commit-action@v5
2121
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/postscript-spec.pdf
55
/*.bmp
66
/*.svg
7+
/test-files/wiki.pdf

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "assets/cmap-resources"]
55
path = assets/cmap-resources
66
url = https://github.com/adobe-type-tools/cmap-resources.git
7+
[submodule "assets/agl-aglfn"]
8+
path = assets/agl-aglfn
9+
url = https://github.com/adobe-type-tools/agl-aglfn

.zed/debug.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"args": [],
5555
"cwd": "$ZED_WORKTREE_ROOT",
5656
"env": {
57-
"DEBUG_TEST_FUNCTION": "test_cff_index_seek_offset_size_2"
57+
"DEBUG_TEST_FUNCTION": "test_deserialize_primitive_arrays"
5858
}
5959
},
6060
"program": "$ZED_WORKTREE_ROOT/build/libs/test/pdf-test-main",

assets/agl-aglfn

Submodule agl-aglfn added at 4036a9c

assets/encodings/AdobeStandard.csv

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
A,65
2+
AE,225
3+
B,66
4+
D,68
5+
E,69
6+
F,70
7+
G,71
8+
H,72
9+
I,73
10+
J,74
11+
K,75
12+
L,76
13+
Lslash,232
14+
M,77
15+
N,78
16+
O,79
17+
OE,234
18+
Oslash,233
19+
P,80
20+
Q,81
21+
R,82
22+
S,83
23+
T,84
24+
U,85
25+
V,86
26+
W,87
27+
X,88
28+
Y,89
29+
Z,90
30+
a,97
31+
acute,194
32+
ae,241
33+
ampersand,38
34+
asciicircum,94
35+
asciitilde,126
36+
asterisk,42
37+
at,64
38+
b,98
39+
backslash,92
40+
bar,124
41+
braceleft,123
42+
braceright,125
43+
bracketleft,91
44+
bracketright,93
45+
breve,198
46+
bullet,183
47+
c,99
48+
caron,207
49+
cedilla,203
50+
cent,162
51+
circumflex,195
52+
colon,58
53+
comma,44
54+
currency,168
55+
d,100
56+
dagger,178
57+
daggerdbl,179
58+
dieresis,200
59+
dollar,36
60+
dotaccent,199
61+
dotlessi,245
62+
e,101
63+
eight,56
64+
ellipsis,188
65+
emdash,208
66+
endash,177
67+
equal,61
68+
exclam,33
69+
exclamdown,161
70+
f,102
71+
fi,174
72+
five,53
73+
fl,175
74+
florin,166
75+
four,52
76+
fraction,164
77+
g,103
78+
germandbls,251
79+
grave,193
80+
greater,62
81+
guillemotleft,171
82+
guillemotright,187
83+
guilsinglleft,172
84+
guilsinglright,173
85+
h,104
86+
hungarumlaut,205
87+
hyphen,45
88+
i,105
89+
j,106
90+
k,107
91+
l,108
92+
less,60
93+
lslash,248
94+
m,109
95+
macron,197
96+
n,110
97+
nine,57
98+
numbersign,35
99+
o,111
100+
oe,250
101+
ogonek,206
102+
one,49
103+
ordfeminine,227
104+
ordmasculine,235
105+
oslash,249
106+
p,112
107+
paragraph,182
108+
parenleft,40
109+
parenright,41
110+
percent,37
111+
period,46
112+
periodcentered,180
113+
perthousand,189
114+
plus,43
115+
q,113
116+
question,63
117+
questiondown,191
118+
quotedbl,34
119+
quotedblbase,185
120+
quotedblleft,170
121+
quotedblright,186
122+
quoteleft,96
123+
quoteright,39
124+
quotesinglbase,184
125+
quotesingle,169
126+
r,114
127+
ring,202
128+
s,115
129+
section,167
130+
semicolon,59
131+
seven,55
132+
six,54
133+
slash,47
134+
space,32
135+
sterling,163
136+
t,116
137+
three,51
138+
tilde,196
139+
two,50
140+
u,117
141+
underscore,95
142+
v,118
143+
w,119
144+
x,120
145+
y,121
146+
yen,165
147+
z,122
148+
zero,48

assets/encodings/MacRoman.csv

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
A,65
2+
AE,174
3+
Aacute,231
4+
Acircumflex,229
5+
Adieresis,128
6+
Agrave,203
7+
Aring,129
8+
Atilde,204
9+
B,66
10+
C,67
11+
Ccedilla,130
12+
D,68
13+
E,69
14+
Eacute,131
15+
Ecircumflex,230
16+
Edieresis,232
17+
Egrave,233
18+
F,70
19+
G,71
20+
H,72
21+
I,73
22+
Iacute,234
23+
Icircumflex,235
24+
Idieresis,236
25+
Igrave,237
26+
J,74
27+
K,75
28+
L,76
29+
M,77
30+
N,78
31+
Ntilde,132
32+
O,79
33+
OE,206
34+
Oacute,238
35+
Ocircumflex,239
36+
Odieresis,133
37+
Ograve,241
38+
Oslash,175
39+
Otilde,205
40+
P,80
41+
Q,81
42+
R,82
43+
S,83
44+
T,84
45+
U,85
46+
Uacute,242
47+
Ucircumflex,243
48+
Udieresis,134
49+
Ugrave,244
50+
V,86
51+
W,87
52+
X,88
53+
Y,89
54+
Ydieresis,217
55+
Z,90
56+
a,97
57+
aacute,135
58+
acircumflex,137
59+
acute,171
60+
adieresis,138
61+
ae,190
62+
agrave,136
63+
ampersand,38
64+
aring,140
65+
asciicircum,94
66+
asciitilde,126
67+
asterisk,42
68+
at,64
69+
atilde,139
70+
b,98
71+
backslash,92
72+
bar,124
73+
braceleft,123
74+
braceright,125
75+
bracketleft,91
76+
bracketright,93
77+
breve,249
78+
bullet,165
79+
c,99
80+
caron,255
81+
ccedilla,141
82+
cedilla,252
83+
cent,162
84+
circumflex,246
85+
colon,58
86+
comma,44
87+
copyright,169
88+
currency,219
89+
d,100
90+
dagger,160
91+
daggerdbl,224
92+
degree,161
93+
dieresis,172
94+
divide,214
95+
dollar,36
96+
dotaccent,250
97+
dotlessi,245
98+
e,101
99+
eacute,142
100+
ecircumflex,144
101+
edieresis,145
102+
egrave,143
103+
eight,56
104+
ellipsis,201
105+
emdash,209
106+
endash,208
107+
equal,61
108+
exclam,33
109+
exclamdown,193
110+
f,102
111+
fi,222
112+
five,53
113+
fl,223
114+
florin,196
115+
four,52
116+
fraction,218
117+
g,103
118+
germandbls,167
119+
grave,96
120+
greater,62
121+
guillemotleft,199
122+
guillemotright,200
123+
guilsinglleft,220
124+
guilsinglright,221
125+
h,104
126+
hungarumlaut,253
127+
hyphen,45
128+
i,105
129+
iacute,146
130+
icircumflex,148
131+
idieresis,149
132+
igrave,147
133+
j,106
134+
k,107
135+
l,108
136+
less,60
137+
logicalnot,194
138+
m,109
139+
macron,248
140+
mu,181
141+
n,110
142+
nine,57
143+
ntilde,150
144+
numbersign,35
145+
o,111
146+
oacute,151
147+
ocircumflex,153
148+
odieresis,154
149+
oe,207
150+
ogonek,254
151+
ograve,152
152+
one,49
153+
ordfeminine,187
154+
ordmasculine,188
155+
oslash,191
156+
otilde,155
157+
p,112
158+
paragraph,166
159+
parenleft,40
160+
parenright,41
161+
percent,37
162+
period,46
163+
periodcentered,225
164+
perthousand,228
165+
plus,43
166+
plusminus,177
167+
q,113
168+
question,63
169+
questiondown,192
170+
quotedbl,34
171+
quotedblbase,227
172+
quotedblleft,210
173+
quotedblright,211
174+
quoteleft,212
175+
quoteright,213
176+
quotesinglbase,226
177+
quotesingle,39
178+
r,114
179+
registered,168
180+
ring,251
181+
s,115
182+
section,164
183+
semicolon,59
184+
seven,55
185+
six,54
186+
slash,47
187+
space,32
188+
sterling,163
189+
t,116
190+
three,51
191+
tilde,247
192+
trademark,170
193+
two,50
194+
u,117
195+
uacute,156
196+
ucircumflex,158
197+
udieresis,159
198+
ugrave,157
199+
underscore,95
200+
v,118
201+
w,119
202+
x,120
203+
y,121
204+
ydieresis,216
205+
yen,180
206+
z,122
207+
zero,48

0 commit comments

Comments
 (0)