In-memory representation of a single @font-face rule. More...
#include "donner/css/FontFace.h"
Static Public Member Functions | |
| static double | FontStretchPercentage (int stretch) |
| Convert a legacy named width to its CSS percentage: normal (5) becomes 100.0. | |
Public Attributes | |
| RcString | familyName |
| font-family descriptor | |
| std::vector< FontFaceSource > | sources |
| ordered src list | |
| int | fontWeight = 400 |
| First weight endpoint (integer 1-1000, 400=normal, 700=bold). | |
| int | fontStyle = 0 |
| font-style descriptor (0=normal, 1=italic, 2=oblique) | |
| int | fontStretch = 5 |
| font-stretch descriptor (1-9, 5=normal, matching FontStretch enum) Optional second weight endpoint. Absence means the scalar fontWeight value. | |
| std::optional< int > | fontWeightMaximum |
| std::optional< std::pair< double, double > > | fontStretchPercentRange |
| Optional width endpoints in percent (100 means normal), overriding fontStretch when valid. A single percentage uses equal endpoints; absence preserves the legacy named-width field. | |
In-memory representation of a single @font-face rule.
FontFaceIdentityKey covers every effective descriptor and source below. As explained for FontFaceSource, extend the key with any field added here; otherwise two rules differing only in the new field become one and the second is dropped.
|
static |
Convert a legacy named width to its CSS percentage: normal (5) becomes 100.0.
| stretch | Named-width ordinal, clamped to 1 (ultra-condensed) through 9 (ultra-expanded). |