Function: validateFontAtlasFileData()
validateFontAtlasFileData(
json,sourcePath):FontAtlasFileData
Defined in: text/font-atlas/validate-font-atlas-data.ts:22
Validates that json is a well-formed, current-version
FontAtlasFileData object, throwing a descriptive error otherwise. This
is the boundary check for atlas files, which may be moddable/user-supplied
content rather than developer-authored assets.
Parameters
json
unknown
The parsed JSON to validate.
sourcePath
string
The path the JSON was loaded from, for error messages.
Returns
json, narrowed to FontAtlasFileData.
Throws
An error if json is not a valid, current-version atlas file.