--- TrueType font file detection
-- @module format.ttf

local format = require("core.format")

format.register({
	name = "TrueType Font",
	shortname = "TTF",
	default_mode = "preview", -- Render the font unless the user chooses another mode
	extensions = { "ttf" },

	-- Pattern breakdown:
	-- '^' anchors the signature at the start of the file
	-- The four escaped bytes are the common binary TrueType scaler version
	-- Older text-like signatures stay extension-only to avoid false text matches
	headers = {
		"^\0\1\0\0",
	},
})
