Parse a WOFF font file.
More...
#include "donner/base/fonts/WoffParser.h"
|
| struct | Options |
| | Resource ceilings for one WOFF parse and sfnt reconstruction. More...
|
|
| static ParseResult< WoffFont > | Parse (std::span< const uint8_t > bytes) |
| | Parse the given WOFF data.
|
|
static ParseResult< WoffFont > | Parse (std::span< const uint8_t > bytes, const Options &options) |
| | Parse using explicit resource limits, primarily for embedding policies and fuzzing.
|
Parse a WOFF font file.
This parser reads the WOFF format (version 1.0), decompresses the font tables, and returns a WoffFont object containing the parsed data.
- See also
- https://www.w3.org/TR/WOFF/ for the WOFF specification.
- Parameters
-
| bytes | The WOFF file data as a byte span. |
- Returns
- A ParseResult containing the parsed WoffFont on success, or a ParseDiagnostic on failure.
◆ donner::fonts::WoffParser::Options
| struct donner::fonts::WoffParser::Options |
Resource ceilings for one WOFF parse and sfnt reconstruction.
| Class Members |
|
size_t |
maximumInputSize = 16 * 1024 * 1024 |
Encoded WOFF input bytes. |
|
size_t |
maximumSfntSize = 64 * 1024 * 1024 |
Aggregate reconstructed sfnt bytes. |
|
size_t |
maximumTableSize = 30 * 1024 * 1024 |
Reconstructed bytes in one table. |
◆ Parse()
Parse the given WOFF data.
- Parameters
-
| bytes | The WOFF file data as a byte span. |
- Returns
- A ParseResult containing the parsed WoffFont on success, or a ParseDiagnostic on failure.
The documentation for this class was generated from the following file: