| BrotliDecompression |
A pluggable decoder for the Brotli-compressed data PeachDrawing.Text reads: the Unicode, hyphenation and dictionary data of its PeachDrawing.Text.Data dependency, and WOFF2 font data (Brotli-compressed by the WOFF2 specification itself). By default, PeachDrawing.Text decompresses with .NET’s own System.IO.Compression.BrotliStream. On a host where that throws System.PlatformNotSupportedException - WebAssembly in a browser, at the time of writing - the affected feature quietly degrades instead of the render failing: a Unicode table comes back empty, text lays out unhyphenated, and a WOFF2 font is skipped as if it could not be read. Call SetDecompressor(Func<Stream,Stream>) once, before using PeachDrawing.Text, to supply a managed Brotli implementation instead and recover that data on such a host. |