Skip to main content

rocketsplash_formats/
provenance.rs

1// <FILE>crates/rocketsplash-formats/src/provenance.rs</FILE>
2// <DESC>Structured font license/provenance metadata carried by .rsf atlases</DESC>
3// <VERS>VERSION: 1.0.0</VERS>
4// <WCTX>Foundation crates 0.3.0 (RELEASE_PLAN §9.3 provenance fields)</WCTX>
5// <CLOG>1.0.0: introduce FontProvenance; rides the FONT_ATLAS_VERSION 2 window so the schema is frozen before gt-design pins its 1.0.</CLOG>
6
7use serde::{Deserialize, Serialize};
8
9/// License and origin metadata for a font atlas derived from an upstream font.
10///
11/// A converted atlas is a modified/derivative work of its source font, so
12/// Reserved-Font-Name rules (OFL 1.1, Bitstream Vera terms) can require a
13/// renamed derivative. These fields let tooling verify compliance mechanically:
14/// the asset-gallery CI gate asserts every shipped `.rsf` carries provenance
15/// and bundles its license text (RELEASE_PLAN §9.3).
16#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
17pub struct FontProvenance {
18    /// Name of the source font this atlas was generated from (e.g. "DejaVu Sans").
19    pub source_font: String,
20    /// Upstream version of the source font, if known (e.g. "2.37").
21    pub source_version: String,
22    /// License identifier, SPDX where possible (e.g. "OFL-1.1", "Bitstream-Vera").
23    pub license: String,
24    /// Human-readable attribution line, suitable for direct display.
25    pub attribution: String,
26    /// True when the atlas uses a non-reserved derivative name per the
27    /// source license's Reserved Font Name / renaming rules.
28    pub renamed: bool,
29}
30
31// <FILE>crates/rocketsplash-formats/src/provenance.rs</FILE>
32// <VERS>END OF VERSION: 1.0.0</VERS>