Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::fonts::WoffParser Class Reference

Parse a WOFF font file. More...

#include "donner/base/fonts/WoffParser.h"

Classes

struct  Options

Static Public Member Functions

static ParseResult< WoffFontParse (std::span< const uint8_t > bytes)
 Parse the given WOFF data.
static ParseResult< WoffFontParse (std::span< const uint8_t > bytes, const Options &options)
 Parse using explicit resource limits, primarily for embedding policies and fuzzing.

Detailed Description

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
bytesThe WOFF file data as a byte span.
Returns
A ParseResult containing the parsed WoffFont on success, or a ParseDiagnostic on failure.

Class Documentation

◆ donner::fonts::WoffParser::Options

struct donner::fonts::WoffParser::Options
Class Members
size_t maximumInputSize = 16 * 1024 * 1024
size_t maximumSfntSize = 64 * 1024 * 1024
size_t maximumTableSize = 30 * 1024 * 1024

Member Function Documentation

◆ Parse()

ParseResult< WoffFont > donner::fonts::WoffParser::Parse ( std::span< const uint8_t > bytes)
static

Parse the given WOFF data.

Parameters
bytesThe 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: