Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
FontFace.h File Reference
#include <cstdint>
#include <memory>
#include <string>
#include <variant>
#include <vector>
#include "donner/base/RcString.h"
Include dependency graph for FontFace.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::css::FontFaceSource
 A single entry listed in src:-either a local face, a URL, or inline data. More...
struct  donner::css::FontFace
 In-memory representation of a single @font-face rule. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::css
 Donner CSS library, a standalone composable CSS parser.

Functions

std::string donner::css::FontFaceIdentityKey (const FontFace &face)
 Build a string that identifies an @font-face declaration.

Class Documentation

◆ donner::css::FontFace

struct donner::css::FontFace

In-memory representation of a single @font-face rule.

FontFaceIdentityKey is total over every field below, for the reason spelled out on FontFaceSource: extend the key with any field added here, or two rules differing only in the new field become one and the second is dropped.

Class Members
RcString familyName font-family descriptor
int fontStretch = 5 font-stretch descriptor (1-9, 5=normal, matching FontStretch enum)
int fontStyle = 0 font-style descriptor (0=normal, 1=italic, 2=oblique)
int fontWeight = 400 font-weight descriptor (100-900, 400=normal, 700=bold)
vector< FontFaceSource > sources ordered src list