OPF
SpecDefinition referenceView source

Font Scheme

Typography selections used by the design system. The pair fields (major, minor) and refinement fields (type, app, languageFamily) mirror font-scheme.schema.json (https://openpresentation.org/schema/opf-font-scheme/v1) so library records and inline OPF overrides are interchangeable on those fields. Two parallel models are supported and may be mixed: - OOXML pairs (major, minor) - heading and body family names that round-trip directly to PowerPoint majorFont/minorFont entries. - Abstract roles (heading, body, accent, code) - OPF-specific font family names the engine maps onto the OOXML pair when serializing. Convenient for inline overrides and for adding accent/code roles that don't have a direct OOXML slot. Catalog records may also carry 'code' (for example the consolas and courier-new records); heading, body and accent are not part of the catalog record schema. A role is a family name only: weight, style and tracking come from the text styles, and PowerPoint has no numeric weight. In design.fontScheme, 'id' resolves a fontSchemes record as the base; pair and role overrides on the same object take precedence over the resolved scheme. The string form of design.fontScheme is equivalent to setting only 'id'.

Metadata

Definition
#/$defs/FontScheme
Form
object
Source
spec/schemas/opf.schema.json

Field index

FieldTypeReq.Description
idref:CatalogReference—Font-scheme reference (a bare id or 'name:id') resolved as the base; field overrides on the surrounding FontScheme object take precedence over the resolved scheme.
majorstring—Heading (major) font family — mirrors the OOXML majorFont entry. Pairs with 'minor'.
minorstring—Body (minor) font family — mirrors the OOXML minorFont entry. Pairs with 'major'.
eastAsianobject—East Asian script fonts. Maps to the OOXML a:ea element of majorFont (major) and minorFont (minor), and to run-level a:ea. When set, they fill the eastAsian slot for every language; when omitted, the slot comes from this scheme's own major/minor when languageFamily is 'ea' and the scheme's languages list is empty or names the presentation language, then from the presentation language's font scheme for East Asian languages, and otherwise from the latin (major/minor) families. A missing 'major' or 'minor' falls back to the other.
complexScriptobject—Complex-script fonts (for example Arabic, Hebrew, Indic and Thai). Maps to the OOXML a:cs element of majorFont (major) and minorFont (minor), and to run-level a:cs. When set, they fill the complexScript slot for every language; when omitted, the slot comes from this scheme's own major/minor when languageFamily is 'cs' and the scheme's languages list is empty or names the presentation language, then from the presentation language's font scheme for complex-script languages, and otherwise from the latin (major/minor) families. A missing 'major' or 'minor' falls back to the other.
typeenum—High-level typographic class of the scheme.
type · Allowed values
"sans-serif""serif""monospace"
appenum—Target application this font pairing is intended for. Metadata for pickers and catalog filters: no engine changes its output by it.
app · Allowed values
"powerpoint""google-slides"
languageFamilyenum—Font-language family this scheme is intended for: 'latin' for Latin-script content, 'ea' (or 'eastAsian', the same value) for East Asian scripts, 'cs' (or 'complexScript', the same value) for Complex Scripts. The long names match the 'eastAsian' and 'complexScript' slot keys; the short names match the OOXML a:ea and a:cs elements; core reads both spellings as one value. As the design font scheme, an 'ea'/'eastAsian' or 'cs'/'complexScript' scheme also fills that script slot with its own major/minor families when its languages list is empty or names the presentation language.
languageFamily · Allowed values
"latin""ea""cs""eastAsian""complexScript"
headingstring—Abstract role: font family name used for slide titles and headings. Maps onto the OOXML major slot when serializing.
bodystring—Abstract role: font family name used for body copy. Maps onto the OOXML minor slot when serializing.
accentstring—Abstract role: font family name used for accent text. When set, the slide tag (eyebrow) and the quote body use this family instead of the body and heading families; nothing else changes. resolveFontFamilies() returns it as accent only when the scheme defines it. No direct OOXML slot: PPTX export writes it on those runs, and the theme fonts stay major/minor.
codestring—Abstract role: monospaced font family name used for code blocks and for inline code runs (TextRun.code). No direct OOXML slot. Resolution: this override, then the resolved font-scheme record's 'code' (for example Consolas for the consolas scheme), then the engine fallback Roboto Mono. Heading and body families are never used as the code fallback.

id

typeref:CatalogReferencerequirednodefault—

Font-scheme reference (a bare id or 'name:id') resolved as the base; field overrides on the surrounding FontScheme object take precedence over the resolved scheme.

id.json
{
  "id": "aptos"
}

major

typestringrequirednodefault—

Heading (major) font family — mirrors the OOXML majorFont entry. Pairs with 'minor'.

major.json
{
  "major": "Aptos Display"
}

minor

typestringrequirednodefault—

Body (minor) font family — mirrors the OOXML minorFont entry. Pairs with 'major'.

minor.json
{
  "minor": "Aptos"
}

eastAsian

typeobjectrequirednodefault—

East Asian script fonts. Maps to the OOXML a:ea element of majorFont (major) and minorFont (minor), and to run-level a:ea. When set, they fill the eastAsian slot for every language; when omitted, the slot comes from this scheme's own major/minor when languageFamily is 'ea' and the scheme's languages list is empty or names the presentation language, then from the presentation language's font scheme for East Asian languages, and otherwise from the latin (major/minor) families. A missing 'major' or 'minor' falls back to the other.

complexScript

typeobjectrequirednodefault—

Complex-script fonts (for example Arabic, Hebrew, Indic and Thai). Maps to the OOXML a:cs element of majorFont (major) and minorFont (minor), and to run-level a:cs. When set, they fill the complexScript slot for every language; when omitted, the slot comes from this scheme's own major/minor when languageFamily is 'cs' and the scheme's languages list is empty or names the presentation language, then from the presentation language's font scheme for complex-script languages, and otherwise from the latin (major/minor) families. A missing 'major' or 'minor' falls back to the other.

type

typeenumrequirednodefault—

High-level typographic class of the scheme.

type · Allowed values
"sans-serif""serif""monospace"
type.json
{
  "type": "sans-serif"
}

app

typeenumrequirednodefault—

Target application this font pairing is intended for. Metadata for pickers and catalog filters: no engine changes its output by it.

app · Allowed values
"powerpoint""google-slides"
app.json
{
  "app": "powerpoint"
}

languageFamily

typeenumrequirednodefault—

Font-language family this scheme is intended for: 'latin' for Latin-script content, 'ea' (or 'eastAsian', the same value) for East Asian scripts, 'cs' (or 'complexScript', the same value) for Complex Scripts. The long names match the 'eastAsian' and 'complexScript' slot keys; the short names match the OOXML a:ea and a:cs elements; core reads both spellings as one value. As the design font scheme, an 'ea'/'eastAsian' or 'cs'/'complexScript' scheme also fills that script slot with its own major/minor families when its languages list is empty or names the presentation language.

languageFamily · Allowed values
"latin""ea""cs""eastAsian""complexScript"
languageFamily.json
{
  "languageFamily": "latin"
}

heading

typestringrequirednodefault—

Abstract role: font family name used for slide titles and headings. Maps onto the OOXML major slot when serializing.

body

typestringrequirednodefault—

Abstract role: font family name used for body copy. Maps onto the OOXML minor slot when serializing.

accent

typestringrequirednodefault—

Abstract role: font family name used for accent text. When set, the slide tag (eyebrow) and the quote body use this family instead of the body and heading families; nothing else changes. resolveFontFamilies() returns it as accent only when the scheme defines it. No direct OOXML slot: PPTX export writes it on those runs, and the theme fonts stay major/minor.

code

typestringrequirednodefault—

Abstract role: monospaced font family name used for code blocks and for inline code runs (TextRun.code). No direct OOXML slot. Resolution: this override, then the resolved font-scheme record's 'code' (for example Consolas for the consolas scheme), then the engine fallback Roboto Mono. Heading and body families are never used as the code fallback.

Complete definition constraints
Schema constraints
{
  "type": "object",
  "description": "Typography selections used by the design system. The pair fields (major, minor) and refinement fields (type, app, languageFamily) mirror font-scheme.schema.json (https://openpresentation.org/schema/opf-font-scheme/v1) so library records and inline OPF overrides are interchangeable on those fields.\n\nTwo parallel models are supported and may be mixed:\n- OOXML pairs (major, minor) - heading and body family names that round-trip directly to PowerPoint majorFont/minorFont entries.\n- Abstract roles (heading, body, accent, code) - OPF-specific font family names the engine maps onto the OOXML pair when serializing. Convenient for inline overrides and for adding accent/code roles that don't have a direct OOXML slot. Catalog records may also carry 'code' (for example the consolas and courier-new records); heading, body and accent are not part of the catalog record schema. A role is a family name only: weight, style and tracking come from the text styles, and PowerPoint has no numeric weight.\n\nIn design.fontScheme, 'id' resolves a fontSchemes record as the base; pair and role overrides on the same object take precedence over the resolved scheme. The string form of design.fontScheme is equivalent to setting only 'id'.",
  "properties": {
    "id": {
      "$ref": "#/$defs/CatalogReference",
      "description": "Font-scheme reference (a bare id or 'name:id') resolved as the base; field overrides on the surrounding FontScheme object take precedence over the resolved scheme.",
      "examples": [
        "aptos",
        "tenorite",
        "seaford",
        "noto-sans",
        "modern-sans",
        "classic-serif"
      ]
    },
    "major": {
      "type": "string",
      "description": "Heading (major) font family — mirrors the OOXML majorFont entry. Pairs with 'minor'.",
      "examples": [
        "Aptos Display",
        "Calibri",
        "Microsoft YaHei",
        "Arial Black"
      ]
    },
    "minor": {
      "type": "string",
      "description": "Body (minor) font family — mirrors the OOXML minorFont entry. Pairs with 'major'.",
      "examples": [
        "Aptos",
        "Calibri",
        "Microsoft YaHei",
        "Arial"
      ]
    },
    "eastAsian": {
      "type": "object",
      "additionalProperties": false,
      "minProperties": 1,
      "description": "East Asian script fonts. Maps to the OOXML a:ea element of majorFont (major) and minorFont (minor), and to run-level a:ea. When set, they fill the eastAsian slot for every language; when omitted, the slot comes from this scheme's own major/minor when languageFamily is 'ea' and the scheme's languages list is empty or names the presentation language, then from the presentation language's font scheme for East Asian languages, and otherwise from the latin (major/minor) families. A missing 'major' or 'minor' falls back to the other.",
      "properties": {
        "major": {
          "type": "string",
          "description": "Heading (major) eastAsian font family — mirrors majorFont a:ea.",
          "examples": [
            "Noto Sans JP",
            "Meiryo",
            "Microsoft YaHei"
          ]
        },
        "minor": {
          "type": "string",
          "description": "Body (minor) eastAsian font family — mirrors minorFont a:ea.",
          "examples": [
            "Noto Sans JP",
            "Meiryo",
            "Microsoft YaHei"
          ]
        }
      }
    },
    "complexScript": {
      "type": "object",
      "additionalProperties": false,
      "minProperties": 1,
      "description": "Complex-script fonts (for example Arabic, Hebrew, Indic and Thai). Maps to the OOXML a:cs element of majorFont (major) and minorFont (minor), and to run-level a:cs. When set, they fill the complexScript slot for every language; when omitted, the slot comes from this scheme's own major/minor when languageFamily is 'cs' and the scheme's languages list is empty or names the presentation language, then from the presentation language's font scheme for complex-script languages, and otherwise from the latin (major/minor) families. A missing 'major' or 'minor' falls back to the other.",
      "properties": {
        "major": {
          "type": "string",
          "description": "Heading (major) complexScript font family — mirrors majorFont a:cs.",
          "examples": [
            "Noto Sans Arabic",
            "Arial",
            "Mangal"
          ]
        },
        "minor": {
          "type": "string",
          "description": "Body (minor) complexScript font family — mirrors minorFont a:cs.",
          "examples": [
            "Noto Sans Arabic",
            "Arial",
            "Mangal"
          ]
        }
      }
    },
    "type": {
      "type": "string",
      "enum": [
        "sans-serif",
        "serif",
        "monospace"
      ],
      "description": "High-level typographic class of the scheme."
    },
    "app": {
      "type": "string",
      "enum": [
        "powerpoint",
        "google-slides"
      ],
      "description": "Target application this font pairing is intended for. Metadata for pickers and catalog filters: no engine changes its output by it."
    },
    "languageFamily": {
      "type": "string",
      "enum": [
        "latin",
        "ea",
        "cs",
        "eastAsian",
        "complexScript"
      ],
      "description": "Font-language family this scheme is intended for: 'latin' for Latin-script content, 'ea' (or 'eastAsian', the same value) for East Asian scripts, 'cs' (or 'complexScript', the same value) for Complex Scripts. The long names match the 'eastAsian' and 'complexScript' slot keys; the short names match the OOXML a:ea and a:cs elements; core reads both spellings as one value. As the design font scheme, an 'ea'/'eastAsian' or 'cs'/'complexScript' scheme also fills that script slot with its own major/minor families when its languages list is empty or names the presentation language."
    },
    "heading": {
      "type": "string",
      "description": "Abstract role: font family name used for slide titles and headings. Maps onto the OOXML major slot when serializing."
    },
    "body": {
      "type": "string",
      "description": "Abstract role: font family name used for body copy. Maps onto the OOXML minor slot when serializing."
    },
    "accent": {
      "type": "string",
      "description": "Abstract role: font family name used for accent text. When set, the slide tag (eyebrow) and the quote body use this family instead of the body and heading families; nothing else changes. resolveFontFamilies() returns it as accent only when the scheme defines it. No direct OOXML slot: PPTX export writes it on those runs, and the theme fonts stay major/minor."
    },
    "code": {
      "type": "string",
      "description": "Abstract role: monospaced font family name used for code blocks and for inline code runs (TextRun.code). No direct OOXML slot. Resolution: this override, then the resolved font-scheme record's 'code' (for example Consolas for the consolas scheme), then the engine fallback Roboto Mono. Heading and body families are never used as the code fallback."
    }
  }
}