Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
FontDataUtils.h File Reference
#include <cstdint>
#include <span>
#include "donner/base/fonts/SfntUtils.h"
Include dependency graph for FontDataUtils.h:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::svg
 Donner SVG library, which can load, manipulate and render SVG files.

Functions

uint16_t donner::svg::ReadUnitsPerEm (std::span< const uint8_t > data)
 Check if raw font data has a valid 'head' table and read unitsPerEm. Returns 0 if missing.
bool donner::svg::HasOutlineTables (std::span< const uint8_t > data)
 Returns true if the raw font has a scalable outline table.
std::optional< std::span< const uint8_t > > donner::svg::FindSfntTable (std::span< const uint8_t > data, std::string_view tag)
 Read a 32-bit big-endian unsigned integer from p.
uint32_t donner::svg::ReadBe32 (const uint8_t *p)
 Read a 32-bit big-endian unsigned integer from p.
bool donner::svg::ValidateSfnt (std::span< const uint8_t > data)
 Return true when data passes the bounded sfnt and outline validation policy.