{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "urn:wavenumber:schema:kicad_monkey.outline_vector:a0",
    "type": "object",
    "properties": {
        "schema": {
            "type": "string",
            "const": "kicad_monkey.outline_vector.a0"
        },
        "type": {
            "type": "string",
            "const": "kicad_monkey.outline_vector"
        },
        "version": {
            "type": "string",
            "const": "a0"
        },
        "case_id": {
            "$ref": "#/$defs/StableTextId"
        },
        "coordinate_format": {
            "type": "string",
            "const": "font_design_units_f64"
        },
        "coordinate_comparison": {
            "$ref": "#/$defs/CoordinateComparisonPolicy"
        },
        "font_id": {
            "$ref": "#/$defs/StableTextId"
        },
        "font_sha256": {
            "$ref": "#/$defs/Sha256Hex"
        },
        "face_index": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4294967295
        },
        "variations": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/FontVariationCoordinate"
            }
        },
        "glyph_id": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4294967295
        },
        "units_per_em": {
            "$ref": "#/$defs/PositiveUint32"
        },
        "commands": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/OutlineCommand"
            }
        }
    },
    "required": [
        "schema",
        "type",
        "version",
        "case_id",
        "coordinate_format",
        "coordinate_comparison",
        "font_id",
        "font_sha256",
        "face_index",
        "variations",
        "glyph_id",
        "units_per_em",
        "commands"
    ],
    "unevaluatedProperties": {
        "not": {}
    },
    "description": "Raw glyph outline oracle in font units, separate from shaping and placement.",
    "title": "Outline vector a0",
    "$defs": {
        "StableTextId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
            "description": "Stable ASCII identifier shared by manifests and oracle cases."
        },
        "CoordinateComparisonPolicy": {
            "anyOf": [
                {
                    "$ref": "#/$defs/ExactComparisonPolicy"
                },
                {
                    "$ref": "#/$defs/AbsoluteToleranceComparisonPolicy"
                }
            ]
        },
        "Sha256Hex": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "Lowercase SHA-256 digest for one out-of-band font buffer."
        },
        "FontVariationCoordinate": {
            "type": "object",
            "properties": {
                "axis": {
                    "$ref": "#/$defs/OpenTypeTag"
                },
                "value": {
                    "$ref": "#/$defs/FiniteFloat"
                }
            },
            "required": [
                "axis",
                "value"
            ],
            "unevaluatedProperties": {
                "not": {}
            },
            "description": "One ordered OpenType variation coordinate."
        },
        "PositiveUint32": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4294967295,
            "description": "Positive OpenType units-per-em value."
        },
        "OutlineCommand": {
            "anyOf": [
                {
                    "$ref": "#/$defs/OutlineMoveTo"
                },
                {
                    "$ref": "#/$defs/OutlineLineTo"
                },
                {
                    "$ref": "#/$defs/OutlineQuadTo"
                },
                {
                    "$ref": "#/$defs/OutlineCurveTo"
                },
                {
                    "$ref": "#/$defs/OutlineClose"
                }
            ]
        },
        "ExactComparisonPolicy": {
            "type": "object",
            "properties": {
                "mode": {
                    "type": "string",
                    "const": "exact"
                }
            },
            "required": [
                "mode"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "AbsoluteToleranceComparisonPolicy": {
            "type": "object",
            "properties": {
                "mode": {
                    "type": "string",
                    "const": "absolute_tolerance"
                },
                "absolute_tolerance": {
                    "$ref": "#/$defs/NonNegativeFiniteFloat"
                }
            },
            "required": [
                "mode",
                "absolute_tolerance"
            ],
            "unevaluatedProperties": {
                "not": {}
            },
            "description": "Absolute tolerance in the enclosing record's declared coordinate unit."
        },
        "OpenTypeTag": {
            "type": "string",
            "pattern": "^[ -~]{4}$",
            "description": "Four-byte OpenType variation or feature tag."
        },
        "FiniteFloat": {
            "type": "number",
            "minimum": -1.7976931348623157e+308,
            "maximum": 1.7976931348623157e+308,
            "description": "Finite float64 value, including fractional CFF/CFF2 design coordinates."
        },
        "OutlineMoveTo": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "move_to"
                },
                "x": {
                    "$ref": "#/$defs/FiniteFloat"
                },
                "y": {
                    "$ref": "#/$defs/FiniteFloat"
                }
            },
            "required": [
                "kind",
                "x",
                "y"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "OutlineLineTo": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "line_to"
                },
                "x": {
                    "$ref": "#/$defs/FiniteFloat"
                },
                "y": {
                    "$ref": "#/$defs/FiniteFloat"
                }
            },
            "required": [
                "kind",
                "x",
                "y"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "OutlineQuadTo": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "quad_to"
                },
                "control_x": {
                    "$ref": "#/$defs/FiniteFloat"
                },
                "control_y": {
                    "$ref": "#/$defs/FiniteFloat"
                },
                "x": {
                    "$ref": "#/$defs/FiniteFloat"
                },
                "y": {
                    "$ref": "#/$defs/FiniteFloat"
                }
            },
            "required": [
                "kind",
                "control_x",
                "control_y",
                "x",
                "y"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "OutlineCurveTo": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "curve_to"
                },
                "control1_x": {
                    "$ref": "#/$defs/FiniteFloat"
                },
                "control1_y": {
                    "$ref": "#/$defs/FiniteFloat"
                },
                "control2_x": {
                    "$ref": "#/$defs/FiniteFloat"
                },
                "control2_y": {
                    "$ref": "#/$defs/FiniteFloat"
                },
                "x": {
                    "$ref": "#/$defs/FiniteFloat"
                },
                "y": {
                    "$ref": "#/$defs/FiniteFloat"
                }
            },
            "required": [
                "kind",
                "control1_x",
                "control1_y",
                "control2_x",
                "control2_y",
                "x",
                "y"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "OutlineClose": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string",
                    "const": "close"
                }
            },
            "required": [
                "kind"
            ],
            "unevaluatedProperties": {
                "not": {}
            }
        },
        "NonNegativeFiniteFloat": {
            "type": "number",
            "minimum": 0,
            "description": "Finite nonnegative tolerance transported as a JSON number."
        }
    }
}