SPB Git

Repository Public License

NOTICE.md 5.3 KB 99 lines markdown

1# woff2 (with Brotli)23| | woff2 | Brotli |4|---|---|---|5| Version | 1.0.2 | 1.2.1 |6| Source | https://github.com/google/woff2/archive/refs/tags/v1.0.2.tar.gz | https://github.com/google/brotli/archive/refs/tags/v1.2.1.tar.gz |7| SHA-256 of the archive | `add272bb09e6384a4833ffca4896350fdb16e0ca22df68c0384773c67a175594` | `98d35d11a78dc453aebb7d10c3748f3f73ff78c8267c0dc697b8631f67bf7e8f` |8| Project | https://github.com/google/woff2 | https://github.com/google/brotli |9| License | MIT | MIT |10| Copyright | Copyright (c) 2013-2017 by the WOFF2 Authors. | Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. |1112Both archives are the source snapshots GitHub generates for the release tags. Neither project publishes a separate13checksum file: the SHA-256 values above are those of the files downloaded on 2026-11-21 and are what `build.sh`14enforces from then on.1516## Why it is bundled1718WOFF2 is Brotli compression plus a font-specific transformation of the `glyf` / `loca` tables. Apple's frameworks19decode WOFF2 (Core Text opens such files) but offer no encoder and no way to get the decoded sfnt bytes back.20google/woff2 is the reference implementation, used by browsers and by fonttools.2122woff2 1.0.2 (2017) is the project's last tagged release. Its decoder is the code the engine exposes to untrusted23files: the engine bounds its output (512 MB), never trusts the announced size, and the test suite runs it on 40024mutated WOFF2 files and on truncated ones without a crash — which is evidence, not proof, for a C++ parser of that25age.2627## How it is built and linked2829`build.sh` downloads the two archives and checks their SHA-256. Brotli is built with its CMake project (Release,30static, tools and tests off). The ten library sources of woff2 (`font`, `glyph`, `normalize`, `table_tags`,31`transform`, `variable_length`, `woff2_common`, `woff2_dec`, `woff2_enc`, `woff2_out`; none of the command-line32tools) are compiled directly with `clang++ -std=c++14 -O2 -arch arm64 -mmacosx-version-min=15.0`, because the CMake33project of 1.0.2 predates current CMake policies and adds nothing for a static library. Everything is merged into34`libCWOFF2.a` and wrapped with the three public C++ headers (`woff2/decode.h`, `encode.h`, `output.h`) into35`CWOFF2.xcframework` — headers only, no module map.3637`Packages/EngineFont` consumes it as a SwiftPM `binaryTarget` and wraps it in its own small C target38(`Sources/CWOFF2Shim`), so that Swift only sees five C functions and no C++ exception can cross the boundary. The39code is statically linked into the application (plus the system's `libc++`); nothing is loaded at run time.4041Build-time tools: `cmake` (Homebrew, already present on the build machine), `make`, `clang++`, `libtool`,42`xcodebuild`. Size of the product: `libCWOFF2.a` 1 052 616 bytes, `CWOFF2.xcframework` 1.0 MB.4344The sources are not modified. `src/`, `work/`, `prefix/` and `CWOFF2.xcframework/` are build products and are not45committed.4647## Obligations4849MIT, for both: the copyright notice and the permission notice must be included in all copies or substantial50portions of the software. The application's acknowledgements must therefore include the two texts below.5152### woff25354```55Copyright (c) 2013-2017 by the WOFF2 Authors.5657Permission is hereby granted, free of charge, to any person obtaining a copy58of this software and associated documentation files (the "Software"), to deal59in the Software without restriction, including without limitation the rights60to use, copy, modify, merge, publish, distribute, sublicense, and/or sell61copies of the Software, and to permit persons to whom the Software is62furnished to do so, subject to the following conditions:6364The above copyright notice and this permission notice shall be included in65all copies or substantial portions of the Software.6667THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR68IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,69FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE70AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER71LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,72OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN73THE SOFTWARE.74```7576### Brotli7778```79Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.8081Permission is hereby granted, free of charge, to any person obtaining a copy82of this software and associated documentation files (the "Software"), to deal83in the Software without restriction, including without limitation the rights84to use, copy, modify, merge, publish, distribute, sublicense, and/or sell85copies of the Software, and to permit persons to whom the Software is86furnished to do so, subject to the following conditions:8788The above copyright notice and this permission notice shall be included in89all copies or substantial portions of the Software.9091THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR92IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,93FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE94AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER95LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,96OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN97THE SOFTWARE.98```99
Files main
Menu

Theme