WOFF2 is a library for converting fonts from the TTF format to the WOFF 2.0 format. It also allows decompression from WOFF 2.0 to TTF. The WOFF 2.0 format uses the Brotli compression algorithm to compress fonts suitable for downloading in CSS @font-face rules.
Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.
Download (HTTP): https://github.com/google/woff2/archive/v1.0.3/woff2-1.0.3.tar.gz
Download MD5 sum: e52808aef69f72a20c89a48e6e310c44
Download size: 40 KB
Estimated disk space required: 2.3 MB
Estimated build time: less than 0.1 SBU
First, fix a problem when building with gcc-15:
sed -i '/output.h/i #include <cstdint>' src/woff2_out.cc
Install WOFF2 by running the following commands:
mkdir out &&
cd out &&
cmake -D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_POLICY_VERSION_MINIMUM=3.5 \
-D CMAKE_SKIP_INSTALL_RPATH=ON .. &&
make
This package does not come with a test suite.
Now, as the root user:
make install
-D
CMAKE_SKIP_INSTALL_RPATH=ON: This switch makes
cmake remove
hardcoded library search paths (rpath) when installing a binary
executable file or a shared library. This package does not need
rpath once it's installed into the standard location, and rpath may
sometimes cause unwanted effects or even security issues.
-D
CMAKE_POLICY_VERSION_MINIMUM=3.5: This switch allows
building this package with cmake-4.0 or newer.