@quillmark/quillify 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +85 -0
  3. package/README.md +55 -2
  4. package/assets/LiberationSans-Bold.ttf +0 -0
  5. package/assets/LiberationSans-BoldItalic.ttf +0 -0
  6. package/assets/LiberationSans-Italic.ttf +0 -0
  7. package/assets/LiberationSans-Regular.ttf +0 -0
  8. package/assets/pdf.worker.js +64908 -0
  9. package/assets/qpdf.wasm +0 -0
  10. package/assets/qpdf.worker.js +148 -0
  11. package/assets/xfa-layer.d.ts +2 -0
  12. package/assets/xfa-layer.js +1 -0
  13. package/dist/api.d.ts +83 -0
  14. package/dist/api.js +1 -0
  15. package/dist/assemble.d.ts +21 -0
  16. package/dist/assemble.js +155 -0
  17. package/dist/coords.d.ts +7 -0
  18. package/dist/coords.js +28 -0
  19. package/dist/display-list.d.ts +84 -0
  20. package/dist/display-list.js +339 -0
  21. package/dist/index.d.ts +6 -0
  22. package/dist/index.js +3 -0
  23. package/dist/inventory.d.ts +4 -0
  24. package/dist/inventory.js +175 -0
  25. package/dist/naming.d.ts +3 -0
  26. package/dist/naming.js +116 -0
  27. package/dist/normalize.d.ts +39 -0
  28. package/dist/normalize.js +159 -0
  29. package/dist/pdfjs.d.ts +17 -0
  30. package/dist/pdfjs.js +95 -0
  31. package/dist/quillify.d.ts +13 -0
  32. package/dist/quillify.js +86 -0
  33. package/dist/refusal.d.ts +47 -0
  34. package/dist/refusal.js +8 -0
  35. package/dist/sanitize.d.ts +20 -0
  36. package/dist/sanitize.js +72 -0
  37. package/dist/strip.d.ts +77 -0
  38. package/dist/strip.js +524 -0
  39. package/dist/types.d.ts +110 -0
  40. package/dist/types.js +27 -0
  41. package/dist/xfa-layer.d.ts +40 -0
  42. package/dist/xfa-layer.js +139 -0
  43. package/dist/xfa-widgets.d.ts +36 -0
  44. package/dist/xfa-widgets.js +128 -0
  45. package/dist/xfa.d.ts +15 -0
  46. package/dist/xfa.js +345 -0
  47. package/licenses/LiberationSans-LICENSE +102 -0
  48. package/licenses/compiler-rt-LICENSE +311 -0
  49. package/licenses/emscripten-LICENSE +102 -0
  50. package/licenses/libcxx-LICENSE +311 -0
  51. package/licenses/libcxxabi-LICENSE +311 -0
  52. package/licenses/libjpeg-turbo-LICENSE +132 -0
  53. package/licenses/libjpeg-turbo-README.ijg +258 -0
  54. package/licenses/musl-COPYRIGHT +193 -0
  55. package/licenses/pdf.js-LICENSE +177 -0
  56. package/licenses/qpdf-LICENSE +202 -0
  57. package/licenses/qpdf-NOTICE +42 -0
  58. package/licenses/zlib-README +118 -0
  59. package/package.json +69 -5
package/dist/xfa.js ADDED
@@ -0,0 +1,345 @@
1
+ import { PDFAcroCheckBox, PDFAcroComboBox, PDFAcroRadioButton, PDFAcroText, PDFCheckBox, PDFDocument, PDFDropdown, PDFFont, PDFField, PDFHexString, PDFName, PDFOperator, PDFOperatorNames, PDFPage, PDFRadioGroup, PDFTextField, StandardFonts, degrees, rgb } from 'pdf-lib';
2
+ import { displayList } from './display-list.js';
3
+ import { openPdf } from './pdfjs.js';
4
+ import { Refused } from './refusal.js';
5
+ import { MAX_PAGES, MAX_PICTURE_PIXELS } from './types.js';
6
+ import { XfaStage } from './xfa-layer.js';
7
+ import { harvestWidgets } from './xfa-widgets.js';
8
+ /**
9
+ * A dynamic Adobe LiveCycle form as an ordinary static AcroForm, or the input
10
+ * unchanged when it is not one.
11
+ *
12
+ * In a dynamic form the fields exist only as XML inside `/AcroForm /XFA`:
13
+ * `/Fields` is empty, and the one page in the file is a placeholder, most often
14
+ * a "Please wait" notice. Converting one takes an XFA layout engine, and pdf.js
15
+ * has one. This runs it, reads the geometry the browser solved off the DOM, and
16
+ * writes both the printed page and the fields back out as a PDF the later
17
+ * stages already take.
18
+ *
19
+ * It is a normalization: bytes in, bytes out, and every later stage reads the
20
+ * result as it reads a static form.
21
+ */
22
+ export async function xfaToAcroForm(bytes, signal) {
23
+ const stage = new XfaStage();
24
+ let opened;
25
+ try {
26
+ // pdf.js adds the faces a form embeds to this document's font set.
27
+ opened = await openPdf(bytes, { enableXfa: true, ownerDocument: await stage.ready }, signal);
28
+ const { pdf, within } = opened;
29
+ if (!pdf.isPureXfa)
30
+ return bytes;
31
+ // pdf.js counts a dynamic form's pages as it opens the file.
32
+ if (pdf.numPages > MAX_PAGES)
33
+ throw new Refused({ code: 'too_many_pages', pages: pdf.numPages, limit: MAX_PAGES });
34
+ const out = await PDFDocument.create();
35
+ const fonts = new Map();
36
+ const widgets = [];
37
+ let pixels = 0;
38
+ for (let number = 1; number <= pdf.numPages; number++) {
39
+ const laid = await within(pdf.getPage(number).then((page) => stage.lay(page)));
40
+ // The shipped worker writes a span of one of these classes where the page's
41
+ // text embeds a page number or a page count that a layout script fills.
42
+ for (const span of laid.layer.querySelectorAll('.xfaPageNumber'))
43
+ span.textContent = String(number);
44
+ for (const span of laid.layer.querySelectorAll('.xfaPageCount'))
45
+ span.textContent = String(pdf.numPages);
46
+ const list = displayList(laid, number);
47
+ for (const { image } of list.pictures)
48
+ pixels += image.naturalWidth * image.naturalHeight;
49
+ if (pixels > MAX_PICTURE_PIXELS)
50
+ throw new Refused({
51
+ code: 'unpaintable',
52
+ page: number - 1,
53
+ construct: 'image',
54
+ detail: 'pixels'
55
+ });
56
+ for (const widget of harvestWidgets(laid, number))
57
+ widgets.push(widget);
58
+ await paint(out.addPage([list.width, list.height]), number, list, async (name) => {
59
+ let font = fonts.get(name);
60
+ if (!font)
61
+ fonts.set(name, (font = await out.embedFont(name)));
62
+ return font;
63
+ });
64
+ }
65
+ stamp(out, widgets);
66
+ return await out.save();
67
+ }
68
+ finally {
69
+ stage.close();
70
+ await opened?.close();
71
+ }
72
+ }
73
+ /** PDF's origin is bottom-left; every primitive arrives top-left. */
74
+ async function paint(page, pageNumber, list, font) {
75
+ const H = list.height;
76
+ for (let box of list.boxes) {
77
+ if (box.radius) {
78
+ // An SVG rect's outline runs along the middle of its stroke, and each
79
+ // radius stops at half the side it lies along.
80
+ const [edge] = box.edges;
81
+ const inset = (edge?.width ?? 0) / 2;
82
+ const w = box.w - 2 * inset;
83
+ const h = box.h - 2 * inset;
84
+ const rx = Math.min(box.radius, w / 2);
85
+ const ry = Math.min(box.radius, h / 2);
86
+ const turn = `a ${rx},${ry} 0 0 1`;
87
+ page.drawSvgPath(`M ${rx},0 h ${w - 2 * rx} ${turn} ${rx},${ry} v ${h - 2 * ry} ${turn} ${-rx},${ry} h ${2 * rx - w} ${turn} ${-rx},${-ry} v ${2 * ry - h} ${turn} ${rx},${-ry} z`, {
88
+ x: box.x + inset,
89
+ y: H - box.y - inset,
90
+ color: box.fill ? rgb(...box.fill) : undefined,
91
+ borderColor: edge ? rgb(...edge.colour) : undefined,
92
+ borderWidth: edge?.width
93
+ });
94
+ continue;
95
+ }
96
+ // The browser paints a box from a whole pixel to a whole pixel, and fits
97
+ // the gap of a dashed edge to the length that leaves it.
98
+ if (box.edges.some((edge) => edge?.dashed)) {
99
+ const [x, y] = [Math.round(box.x), Math.round(box.y)];
100
+ box = { ...box, x, y, w: Math.round(box.x + box.w) - x, h: Math.round(box.y + box.h) - y };
101
+ }
102
+ if (box.fill)
103
+ page.drawRectangle({
104
+ x: box.x,
105
+ y: H - box.y - box.h,
106
+ width: box.w,
107
+ height: box.h,
108
+ color: rgb(...box.fill),
109
+ borderWidth: 0
110
+ });
111
+ const [top, right, bottom, left] = box.edges;
112
+ const seg = (x1, y1, x2, y2, edge) => page.drawLine({
113
+ start: { x: x1, y: H - y1 },
114
+ end: { x: x2, y: H - y2 },
115
+ thickness: edge.width,
116
+ color: rgb(...edge.colour),
117
+ dashArray: edge.dashed ? dashes(edge.width, x2 - x1 + y2 - y1) : undefined
118
+ });
119
+ if (top)
120
+ seg(box.x, box.y + top.width / 2, box.x + box.w, box.y + top.width / 2, top);
121
+ if (bottom)
122
+ seg(box.x, box.y + box.h - bottom.width / 2, box.x + box.w, box.y + box.h - bottom.width / 2, bottom);
123
+ if (left)
124
+ seg(box.x + left.width / 2, box.y, box.x + left.width / 2, box.y + box.h, left);
125
+ if (right)
126
+ seg(box.x + box.w - right.width / 2, box.y, box.x + box.w - right.width / 2, box.y + box.h, right);
127
+ }
128
+ for (const { x, y, w, h, image } of list.pictures) {
129
+ // The pixels are read off a canvas of the host page's. The frame's policy
130
+ // governs what its document loads, and the picture is of the page's origin.
131
+ const canvas = document.createElement('canvas');
132
+ canvas.width = image.naturalWidth;
133
+ canvas.height = image.naturalHeight;
134
+ canvas.getContext('2d').drawImage(image, 0, 0);
135
+ const png = canvas.toDataURL('image/png');
136
+ // What a canvas with a side the browser will not make gives.
137
+ if (png === 'data:,')
138
+ throw new Refused({ code: 'unpaintable', page: pageNumber - 1, construct: 'image' });
139
+ page.drawImage(await page.doc.embedPng(png), { x, y: H - y - h, width: w, height: h });
140
+ }
141
+ for (const line of list.lines)
142
+ page.drawLine({
143
+ start: { x: line.x1, y: H - line.y1 },
144
+ end: { x: line.x2, y: H - line.y2 },
145
+ thickness: line.width,
146
+ color: rgb(...line.colour)
147
+ });
148
+ return drawRuns(page, pageNumber, list.runs, H, font);
149
+ }
150
+ /**
151
+ * The dash and the gap the browser paints along a dashed edge, or nothing for
152
+ * an edge it paints whole. A dash is three widths and a gap two for an edge
153
+ * under 3 px wide, and two and one from there. An edge too short for two
154
+ * dashes is whole, and one too short for two dashes and a whole gap has both
155
+ * shortened alike. On any other the gap is fitted so that the edge starts and
156
+ * ends on a whole dash: of the two counts of dashes its length lies between,
157
+ * it has the one whose gap is nearer.
158
+ */
159
+ function dashes(width, length) {
160
+ const [dash, gap] = width < 3 ? [3 * width, 2 * width] : [2 * width, width];
161
+ if (length <= 2 * dash)
162
+ return undefined;
163
+ const short = length / (2 * dash + gap);
164
+ if (short <= 1)
165
+ return [dash * short, gap * short];
166
+ const count = Math.floor((length + gap) / (dash + gap));
167
+ const fit = (dashes) => (length - dashes * dash) / (dashes - 1);
168
+ const [wide, narrow] = [fit(count), fit(count + 1)];
169
+ return [dash, narrow <= 0 || Math.abs(wide - gap) < Math.abs(narrow - gap) ? wide : narrow];
170
+ }
171
+ async function drawRuns(page, pageNumber, runs, H, get) {
172
+ for (const run of runs) {
173
+ const font = await get(standard14(run));
174
+ // The standard-14 fonts encode WinAnsi alone. Dropping the run would lose a
175
+ // line of the form without anything reporting it.
176
+ const encodable = font.getCharacterSet();
177
+ if ([...run.text].some((char) => !encodable.includes(char.codePointAt(0))))
178
+ throw new Refused({
179
+ code: 'unpaintable',
180
+ page: pageNumber - 1,
181
+ construct: 'glyph',
182
+ detail: run.text.slice(0, 40)
183
+ });
184
+ // The standard-14 substitute's advances differ from the embedded face's.
185
+ // Letter spacing goes in first, since it is a real property of the run;
186
+ // horizontal scaling then pins the whole run to the width the browser
187
+ // measured, so the error stays inside the run instead of drifting across
188
+ // the line.
189
+ // pdf-lib kerns the width it measures and writes no kerning, so the width
190
+ // it draws a run at is the sum of the widths of its characters.
191
+ let natural = 0;
192
+ for (const char of run.text)
193
+ natural += font.widthOfTextAtSize(char, run.size);
194
+ const spaced = natural + run.letterSpacing * Math.max(0, run.text.length - 1);
195
+ const scale = spaced > 0 && run.width > 0 ? Math.max(50, Math.min(200, (100 * run.width) / spaced)) : 100;
196
+ const scaled = Math.abs(scale - 100) > 3;
197
+ // Both are text-state parameters, so they persist across drawText's own
198
+ // BT/ET and have to be put back.
199
+ if (run.letterSpacing)
200
+ page.pushOperators(PDFOperator.of(PDFOperatorNames.SetCharacterSpacing, [
201
+ String(+run.letterSpacing.toFixed(4))
202
+ ]));
203
+ if (scaled)
204
+ page.pushOperators(PDFOperator.of(PDFOperatorNames.SetTextHorizontalScaling, [String(+scale.toFixed(3))]));
205
+ page.drawText(run.text, {
206
+ x: run.x,
207
+ y: H - run.baseline,
208
+ size: run.size,
209
+ font,
210
+ color: rgb(...run.colour),
211
+ rotate: degrees(90 * (run.turn ?? 0))
212
+ });
213
+ if (scaled)
214
+ page.pushOperators(PDFOperator.of(PDFOperatorNames.SetTextHorizontalScaling, ['100']));
215
+ if (run.letterSpacing)
216
+ page.pushOperators(PDFOperator.of(PDFOperatorNames.SetCharacterSpacing, ['0']));
217
+ }
218
+ }
219
+ function standard14(run) {
220
+ const family = run.family.toLowerCase();
221
+ if (family.includes('courier') || family.includes('mono'))
222
+ return run.bold && run.italic
223
+ ? StandardFonts.CourierBoldOblique
224
+ : run.bold
225
+ ? StandardFonts.CourierBold
226
+ : run.italic
227
+ ? StandardFonts.CourierOblique
228
+ : StandardFonts.Courier;
229
+ if (family.includes('times') || (family.includes('serif') && !family.includes('sans')))
230
+ return run.bold && run.italic
231
+ ? StandardFonts.TimesRomanBoldItalic
232
+ : run.bold
233
+ ? StandardFonts.TimesRomanBold
234
+ : run.italic
235
+ ? StandardFonts.TimesRomanItalic
236
+ : StandardFonts.TimesRoman;
237
+ return run.bold && run.italic
238
+ ? StandardFonts.HelveticaBoldOblique
239
+ : run.bold
240
+ ? StandardFonts.HelveticaBold
241
+ : run.italic
242
+ ? StandardFonts.HelveticaOblique
243
+ : StandardFonts.Helvetica;
244
+ }
245
+ /**
246
+ * The fields, as the shapes the inventory already understands. Radios become a
247
+ * real AcroForm radio group, so the inventory reads each option's group and
248
+ * on-state as it reads a static form's.
249
+ *
250
+ * For a text field, a checkbox and a dropdown pdf-lib asks whether
251
+ * `backgroundColor` and `borderColor` are `in` the options, and defaults a
252
+ * missing background to white and a missing border to black, so both are
253
+ * passed as undefined. Left out, each paints a white box with a black border
254
+ * over the page. A radio option takes those defaults whatever is passed, with
255
+ * a border of no width.
256
+ *
257
+ * The fields are flat, each made from pdf-lib's own field class with its whole
258
+ * name as its `/T`. pdf-lib's form would read a period in the name as a level
259
+ * of its field tree, and holds no name as both a field and the parent of one,
260
+ * which a field named as the subform beside it asks for. pdf.js joins the `/T`
261
+ * of a field's ancestors with periods, so the inventory reads the whole name.
262
+ *
263
+ * A signature field is a dictionary of the keys the inventory reads, since
264
+ * pdf-lib has no class that creates one.
265
+ */
266
+ function stamp(doc, widgets) {
267
+ const { acroForm } = doc.getForm();
268
+ const pages = doc.getPages();
269
+ const chrome = { borderWidth: 0, backgroundColor: undefined, borderColor: undefined };
270
+ const groups = new Map();
271
+ const states = new Map();
272
+ const rooted = (acro, name, of) => {
273
+ acro.setPartialName(name);
274
+ acroForm.addField(acro.ref);
275
+ return of(acro, acro.ref, doc);
276
+ };
277
+ for (const widget of widgets) {
278
+ const page = pages[widget.page];
279
+ const box = {
280
+ x: widget.x,
281
+ y: page.getHeight() - widget.y - widget.h,
282
+ width: widget.w,
283
+ height: widget.h,
284
+ ...chrome
285
+ };
286
+ if (widget.kind === 'radio' && widget.group) {
287
+ let group = groups.get(widget.group);
288
+ if (!group) {
289
+ group = rooted(PDFAcroRadioButton.create(doc.context), widget.group, PDFRadioGroup.of);
290
+ groups.set(widget.group, group);
291
+ states.set(widget.group, new Set());
292
+ }
293
+ // Two members of one group cannot share an on-state, or picking either
294
+ // picks both.
295
+ const used = states.get(widget.group);
296
+ let on = widget.on || 'option';
297
+ for (let n = 2; used.has(on); n++)
298
+ on = `${widget.on || 'option'}${n}`;
299
+ used.add(on);
300
+ group.addOptionToPage(on, page, box);
301
+ tooltip(group, widget.tooltip);
302
+ continue;
303
+ }
304
+ if (widget.kind === 'checkbox') {
305
+ const tick = rooted(PDFAcroCheckBox.create(doc.context), widget.name, PDFCheckBox.of);
306
+ tick.addToPage(page, box);
307
+ tooltip(tick, widget.tooltip);
308
+ continue;
309
+ }
310
+ if (widget.kind === 'choice') {
311
+ const dropdown = rooted(PDFAcroComboBox.create(doc.context), widget.name, PDFDropdown.of);
312
+ dropdown.addOptions(widget.options.length ? widget.options : ['']);
313
+ dropdown.addToPage(page, box);
314
+ tooltip(dropdown, widget.tooltip);
315
+ continue;
316
+ }
317
+ if (widget.kind === 'signature') {
318
+ const ref = doc.context.register(doc.context.obj({
319
+ FT: 'Sig',
320
+ Subtype: 'Widget',
321
+ T: PDFHexString.fromText(widget.name),
322
+ Rect: [box.x, box.y, box.x + box.width, box.y + box.height],
323
+ ...(widget.tooltip ? { TU: PDFHexString.fromText(widget.tooltip) } : {})
324
+ }));
325
+ page.node.addAnnot(ref);
326
+ acroForm.addField(ref);
327
+ continue;
328
+ }
329
+ const field = rooted(PDFAcroText.create(doc.context), widget.name, PDFTextField.of);
330
+ if (widget.kind === 'multiline')
331
+ field.enableMultiline();
332
+ field.addToPage(page, box);
333
+ tooltip(field, widget.tooltip);
334
+ }
335
+ }
336
+ /** `/TU`, which the inventory reads as the widget's tooltip. */
337
+ function tooltip(field, text) {
338
+ if (!text)
339
+ return;
340
+ // Written on the widget just added. `addToPage` and `addOptionToPage` push
341
+ // into `/Kids`, so writing to every kid would give each option of a radio
342
+ // group the last option's caption.
343
+ const widget = field.acroField.getWidgets().at(-1);
344
+ widget?.dict.set(PDFName.of('TU'), PDFHexString.fromText(text));
345
+ }
@@ -0,0 +1,102 @@
1
+ Digitized data copyright (c) 2010 Google Corporation
2
+ with Reserved Font Arimo, Tinos and Cousine.
3
+ Copyright (c) 2012 Red Hat, Inc.
4
+ with Reserved Font Name Liberation.
5
+
6
+ This Font Software is licensed under the SIL Open Font License,
7
+ Version 1.1.
8
+
9
+ This license is copied below, and is also available with a FAQ at:
10
+ http://scripts.sil.org/OFL
11
+
12
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
13
+
14
+ PREAMBLE The goals of the Open Font License (OFL) are to stimulate
15
+ worldwide development of collaborative font projects, to support the font
16
+ creation efforts of academic and linguistic communities, and to provide
17
+ a free and open framework in which fonts may be shared and improved in
18
+ partnership with others.
19
+
20
+ The OFL allows the licensed fonts to be used, studied, modified and
21
+ redistributed freely as long as they are not sold by themselves.
22
+ The fonts, including any derivative works, can be bundled, embedded,
23
+ redistributed and/or sold with any software provided that any reserved
24
+ names are not used by derivative works. The fonts and derivatives,
25
+ however, cannot be released under any other type of license. The
26
+ requirement for fonts to remain under this license does not apply to
27
+ any document created using the fonts or their derivatives.
28
+
29
+
30
+
31
+ DEFINITIONS
32
+ "Font Software" refers to the set of files released by the Copyright
33
+ Holder(s) under this license and clearly marked as such.
34
+ This may include source files, build scripts and documentation.
35
+
36
+ "Reserved Font Name" refers to any names specified as such after the
37
+ copyright statement(s).
38
+
39
+ "Original Version" refers to the collection of Font Software components
40
+ as distributed by the Copyright Holder(s).
41
+
42
+ "Modified Version" refers to any derivative made by adding to, deleting,
43
+ or substituting ? in part or in whole ?
44
+ any of the components of the Original Version, by changing formats or
45
+ by porting the Font Software to a new environment.
46
+
47
+ "Author" refers to any designer, engineer, programmer, technical writer
48
+ or other person who contributed to the Font Software.
49
+
50
+
51
+ PERMISSION & CONDITIONS
52
+
53
+ Permission is hereby granted, free of charge, to any person obtaining a
54
+ copy of the Font Software, to use, study, copy, merge, embed, modify,
55
+ redistribute, and sell modified and unmodified copies of the Font
56
+ Software, subject to the following conditions:
57
+
58
+ 1) Neither the Font Software nor any of its individual components,in
59
+ Original or Modified Versions, may be sold by itself.
60
+
61
+ 2) Original or Modified Versions of the Font Software may be bundled,
62
+ redistributed and/or sold with any software, provided that each copy
63
+ contains the above copyright notice and this license. These can be
64
+ included either as stand-alone text files, human-readable headers or
65
+ in the appropriate machine-readable metadata fields within text or
66
+ binary files as long as those fields can be easily viewed by the user.
67
+
68
+ 3) No Modified Version of the Font Software may use the Reserved Font
69
+ Name(s) unless explicit written permission is granted by the
70
+ corresponding Copyright Holder. This restriction only applies to the
71
+ primary font name as presented to the users.
72
+
73
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
74
+ Software shall not be used to promote, endorse or advertise any
75
+ Modified Version, except to acknowledge the contribution(s) of the
76
+ Copyright Holder(s) and the Author(s) or with their explicit written
77
+ permission.
78
+
79
+ 5) The Font Software, modified or unmodified, in part or in whole, must
80
+ be distributed entirely under this license, and must not be distributed
81
+ under any other license. The requirement for fonts to remain under
82
+ this license does not apply to any document created using the Font
83
+ Software.
84
+
85
+
86
+
87
+ TERMINATION
88
+ This license becomes null and void if any of the above conditions are not met.
89
+
90
+
91
+
92
+ DISCLAIMER
93
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
94
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
95
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
96
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
97
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
98
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
99
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
100
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
101
+ DEALINGS IN THE FONT SOFTWARE.
102
+