| { |
| "$id": "https://fuchsia.dev/schema/src/fonts/tools/schemas/fontcfg.schema.json", |
| "$schema": "http://json-schema.org/draft-07/schema#", |
| "description": "A manually written, product-specific font configuration.\nRecommended extension: .fontcfg.json", |
| "type": "object", |
| "definitions": { |
| "typeface_reference": { |
| "oneOf": [ |
| { |
| "$ref": "#/definitions/file_name" |
| }, |
| { |
| "type": "object", |
| "required": [ |
| "file_name" |
| ], |
| "properties": { |
| "file_name": { |
| "$ref": "#/definitions/file_name" |
| }, |
| "index": { |
| "type": "integer", |
| "minimum": 0, |
| "description": "Index of the typeface within the font file" |
| } |
| } |
| }, |
| { |
| "type": "object", |
| "required": [ |
| "full_name" |
| ], |
| "properties": { |
| "full_name": { |
| "type": "string", |
| "minLength": 1, |
| "description": "The human-readable \"full name\" of the typeface, from the typeface's metadata" |
| } |
| } |
| } |
| ] |
| }, |
| "file_name": { |
| "type": "string", |
| "pattern": "^[a-zA-Z0-9_\\-.]+\\.[a-zA-Z0-9_\\-]+$", |
| "description": "The name of the font file", |
| "examples": [ |
| "Roboto-Regular.ttf", |
| "NotoSans-CJK.ttc" |
| ] |
| }, |
| "settings": { |
| "type": "object", |
| "properties": { |
| "cache_size_bytes": { |
| "type": "integer", |
| "minimum": 0, |
| "description": "Maximum size of the in-memory font asset cache, in bytes" |
| } |
| } |
| } |
| }, |
| "required": [ |
| "version" |
| ], |
| "properties": { |
| "version": { |
| "type": "string", |
| "description": "Schema version", |
| "pattern": "^[0-9]+$" |
| }, |
| "fallback_chain": { |
| "type": "array", |
| "items": { |
| "$ref": "#/definitions/typeface_reference" |
| }, |
| "description": "Sequence of fallback typefaces for the target product" |
| } |
| } |
| } |