Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::css::FontFaceSource Struct Reference

A single entry listed in src:—either a local face, a URL, or inline data. More...

#include "donner/css/FontFace.h"

Collaboration diagram for donner::css::FontFaceSource:
[legend]

Public Types

enum class  Kind : uint8_t {
  Local ,
  Url ,
  Data
}
 Specifies the source type for a font face declaration. More...
 

Public Attributes

Kind kind
 Font source kind.
 
std::variant< RcString, std::vector< uint8_t > > payload
 The payload of the source, which can be a URL or raw data (already parsed from the data URL).
 
RcString formatHint
 Format hint, if provided, e.g. "woff2" or "opentype".
 
std::vector< RcStringtechHints
 Technology hints, if provided, e.g. {"variations","color-COLRv1"}.
 

Detailed Description

A single entry listed in src:—either a local face, a URL, or inline data.

Member Enumeration Documentation

◆ Kind

Specifies the source type for a font face declaration.

Enumerator
Local 

Font is loaded from a local system font by name (local() function)

Url 

Font is loaded from a remote URL or file path (url() function)

Data 

Font is embedded as inline data using a data URI scheme.


The documentation for this struct was generated from the following file: