# Third-Party Notices

FormFabricator is licensed under the GPL-3.0-or-later (see `LICENSE`). It bundles the
following third-party libraries in `vendor/`, each under its own
GPL-compatible license:

| Library                          | License        | Purpose                          |
|-----------------------------------|----------------|-----------------------------------|
| mpdf/mpdf                        | GPL-2.0-only   | PDF generation                    |
| setasign/fpdi                    | MIT            | PDF import (used by mPDF)         |
| smalot/pdfparser                 | LGPL-3.0       | Reading/parsing uploaded PDFs      |
| myclabs/deep-copy                | MIT            | Object cloning (mPDF dependency)  |
| paragonie/random_compat          | MIT            | CSPRNG polyfill (mPDF dependency) |
| psr/http-message                 | MIT            | HTTP message interfaces           |
| psr/log                          | MIT            | Logging interfaces                |
| symfony/polyfill-mbstring        | MIT            | mbstring polyfill                 |
| mpdf/psr-http-message-shim       | MIT            | mPDF PSR-7 shim                   |
| mpdf/psr-log-aware-trait         | MIT            | mPDF PSR-3 shim                   |

Each library's full license text is included alongside it under
`vendor/<vendor>/<package>/LICENSE`.

Of the fonts mPDF ships in `vendor/mpdf/mpdf/ttfonts/`, the release build keeps
only those the PDF uses: the DejaVu families (the PDF Layout's fonts), from
GNU FreeFont FreeMono (a PDF Layout font) and FreeSerif, and Quivira. FreeSerif
and Quivira draw characters the chosen font lacks, such as rarer letters and
symbols:

| Fonts        | License                                         | Notes in the package |
|--------------|-------------------------------------------------|----------------------|
| DejaVu       | Bitstream Vera Fonts license (free, GPL-compatible) | `ttfonts/DejaVuinfo.txt` |
| GNU FreeFont | GPL-3.0-or-later with font exception            | `ttfonts/GNUFreeFontinfo.txt` |
| Quivira (Alexander Lange) | Public domain: free for any use and redistribution; the author asks that it not be altered (it is shipped unaltered) | — |

FormFabricator also bundles the ALTCHA widget under `vendor/altcha/` (placed
there manually, not installed via Composer: it is an npm package, not a PHP one). CAPTCHA fields set to
ALTCHA load it in the visitor's browser; the challenge it solves comes from the
site itself, and the site checks the answer (no third-party service):

| Library              | Version | License | Purpose                          |
|----------------------|---------|---------|----------------------------------|
| ALTCHA               | 3.3.0   | MIT     | Self-hosted proof-of-work CAPTCHA widget |

The exact file and provenance are recorded in `vendor/altcha/VERSION` (altcha
3.3.0, `dist/main/altcha.min.js`, unmodified), with the full MIT license text in
`vendor/altcha/LICENSE.txt`. MIT is GPL-compatible.

FormFabricator also bundles Font Awesome Free under `assets/vendor/fontawesome/`
(placed there manually, not installed via Composer/npm), used for admin-UI
icons:

| Library              | Version | License                          | Purpose            |
|----------------------|---------|-----------------------------------|--------------------|
| Font Awesome Free    | 6.5.2   | CC BY 4.0 (icons) / SIL OFL 1.1 (fonts) / MIT (code) | Admin-UI iconography |

Font Awesome Free's full license text is included at
`assets/vendor/fontawesome/LICENSE.txt`. All three of its constituent
licenses (CC BY 4.0, SIL OFL 1.1, MIT) are GPL-compatible and require no
relicensing to bundle here.

Development-only tooling (PHP_CodeSniffer, WordPress Coding Standards, PHPStubs)
is listed in `composer.json`'s `require-dev` and is **not** included in release
builds.
