
from Find_all_key_paths import keysFromFile

allKeys = [
	"/.appVersion",
	"/.formatVersion",
	"/DisplayStrings",
	"/axes/hidden",
	"/axes/name",
	"/axes/tag",
	"/classes/automatic",
	"/classes/code",
	"/classes/disabled",
	"/classes/name",
	"/classes/notes",
	"/customParameters",
	"/date",
	"/familyName",
	"/featurePrefixes/automatic",
	"/featurePrefixes/code",
	"/featurePrefixes/disabled",
	"/featurePrefixes/name",
	"/featurePrefixes/notes",
	"/features/automatic",
	"/features/code",
	"/features/disabled",
	"/features/labels/language",
	"/features/labels/value",
	"/features/notes",
	"/features/tag",
	"/fontMaster/axesValues",
	"/fontMaster/customParameters",
	"/fontMaster/guides/angle",
	"/fontMaster/guides/filter",
	"/fontMaster/guides/lockAngle",
	"/fontMaster/guides/locked",
	"/fontMaster/guides/name",
	"/fontMaster/guides/orientation",
	"/fontMaster/guides/pos",
	"/fontMaster/guides/showMeasurement",
	"/fontMaster/iconName",
	"/fontMaster/id",
	"/fontMaster/metricValues/over",
	"/fontMaster/metricValues/pos",
	"/fontMaster/name",
	"/fontMaster/numberValues",
	"/fontMaster/stemValues",
	"/fontMaster/userData",
	"/fontMaster/visible",
	"/glyphs/case",
	"/glyphs/category",
	"/glyphs/color",
	"/glyphs/direction",
	"/glyphs/export",
	"/glyphs/glyphname",
	"/glyphs/kernLeft",
	"/glyphs/kernRight",
	"/glyphs/lastChange",
	"/glyphs/layers/anchors/name",
	"/glyphs/layers/anchors/pos",
	"/glyphs/layers/anchors/userData",
	"/glyphs/layers/annotations/angle",
	"/glyphs/layers/annotations/pos",
	"/glyphs/layers/annotations/text",
	"/glyphs/layers/annotations/type",
	"/glyphs/layers/annotations/width",
	"/glyphs/layers/associatedMasterId",
	"/glyphs/layers/attr/axisRules/max",
	"/glyphs/layers/attr/axisRules/min",
	"/glyphs/layers/attr/color",
	"/glyphs/layers/attr/colorPalette",
	"/glyphs/layers/attr/coordinates",
	# "/glyphs/layers/attr/freeMaster",
	"/glyphs/layers/attr/svg",
	# "/glyphs/layers/background/anchors/name",
	# "/glyphs/layers/background/anchors/pos",
	# "/glyphs/layers/background/anchors/userData",
	# "/glyphs/layers/background/annotations/pos",
	# "/glyphs/layers/background/annotations/text",
	# "/glyphs/layers/background/annotations/type",
	# "/glyphs/layers/background/backgroundImage/imagePath",
	# "/glyphs/layers/background/backgroundImage/locked",
	# "/glyphs/layers/background/backgroundImage/pos",
	# "/glyphs/layers/background/backgroundImage/scale",
	# "/glyphs/layers/background/guides/angle",
	# "/glyphs/layers/background/guides/pos",
	# "/glyphs/layers/background/hints/horizontal",
	# "/glyphs/layers/background/hints/name",
	# "/glyphs/layers/background/hints/options",
	# "/glyphs/layers/background/hints/origin",
	# "/glyphs/layers/background/hints/other1",
	# "/glyphs/layers/background/hints/place",
	# "/glyphs/layers/background/hints/scale",
	# "/glyphs/layers/background/hints/settings/deltaV",
	# "/glyphs/layers/background/hints/stem",
	# "/glyphs/layers/background/hints/target",
	# "/glyphs/layers/background/hints/type",
	# "/glyphs/layers/background/shapes/alignment",
	# "/glyphs/layers/background/shapes/anchor",
	# "/glyphs/layers/background/shapes/angle",
	# "/glyphs/layers/background/shapes/attr/fill",
	# "/glyphs/layers/background/shapes/attr/fillColor",
	# "/glyphs/layers/background/shapes/attr/identifier",
	# "/glyphs/layers/background/shapes/attr/lineCapEnd",
	# "/glyphs/layers/background/shapes/attr/lineCapStart",
	# "/glyphs/layers/background/shapes/attr/mask",
	# "/glyphs/layers/background/shapes/attr/strokeHeight",
	# "/glyphs/layers/background/shapes/attr/strokePos",
	# "/glyphs/layers/background/shapes/attr/strokeWidth",
	# "/glyphs/layers/background/shapes/closed",
	# "/glyphs/layers/background/shapes/locked",
	# "/glyphs/layers/background/shapes/nodes",
	# "/glyphs/layers/background/shapes/piece",
	# "/glyphs/layers/background/shapes/pos",
	# "/glyphs/layers/background/shapes/ref",
	# "/glyphs/layers/background/shapes/scale",
	# "/glyphs/layers/background/shapes/slant",
	"/glyphs/layers/backgroundImage/angle",
	"/glyphs/layers/backgroundImage/crop",
	"/glyphs/layers/backgroundImage/imagePath",
	"/glyphs/layers/backgroundImage/locked",
	"/glyphs/layers/backgroundImage/pos",
	"/glyphs/layers/backgroundImage/scale",
	"/glyphs/layers/color",
	"/glyphs/layers/guides/angle",
	# "/glyphs/layers/guides/filter",
	"/glyphs/layers/guides/lockAngle",
	"/glyphs/layers/guides/locked",
	"/glyphs/layers/guides/name",
	"/glyphs/layers/guides/orientation",
	"/glyphs/layers/guides/pos",
	"/glyphs/layers/guides/showMeasurement",
	"/glyphs/layers/hints/horizontal",
	"/glyphs/layers/hints/name",
	"/glyphs/layers/hints/options",
	"/glyphs/layers/hints/origin",
	"/glyphs/layers/hints/other1",
	"/glyphs/layers/hints/place",
	"/glyphs/layers/hints/scale",
	"/glyphs/layers/hints/settings/deltaV",
	"/glyphs/layers/hints/stem",
	"/glyphs/layers/hints/target",
	"/glyphs/layers/hints/type",
	"/glyphs/layers/layerId",
	"/glyphs/layers/metricLeft",
	"/glyphs/layers/metricRight",
	"/glyphs/layers/metricWidth",
	"/glyphs/layers/name",
	"/glyphs/layers/partSelection",
	"/glyphs/layers/shapes/alignment",
	"/glyphs/layers/shapes/anchor",
	"/glyphs/layers/shapes/angle",
	# "/glyphs/layers/shapes/attr/SFSymbolHierarchical",
	# "/glyphs/layers/shapes/attr/SFSymbolMulticolor",
	"/glyphs/layers/shapes/attr/fill",
	"/glyphs/layers/shapes/attr/fillColor",
	"/glyphs/layers/shapes/attr/gradient/colors",
	"/glyphs/layers/shapes/attr/gradient/end",
	"/glyphs/layers/shapes/attr/gradient/start",
	"/glyphs/layers/shapes/attr/gradient/type",
	# "/glyphs/layers/shapes/attr/identifier",
	"/glyphs/layers/shapes/attr/lineCapEnd",
	"/glyphs/layers/shapes/attr/lineCapStart",
	"/glyphs/layers/shapes/attr/mask",
	"/glyphs/layers/shapes/attr/reversePaths",
	"/glyphs/layers/shapes/attr/shadow/blur",
	"/glyphs/layers/shapes/attr/shadow/color",
	"/glyphs/layers/shapes/attr/shadow/offsetX",
	"/glyphs/layers/shapes/attr/shadow/offsetY",
	"/glyphs/layers/shapes/attr/strokeColor",
	"/glyphs/layers/shapes/attr/strokeHeight",
	"/glyphs/layers/shapes/attr/strokePos",
	"/glyphs/layers/shapes/attr/strokeWidth",
	"/glyphs/layers/shapes/closed",
	"/glyphs/layers/shapes/locked",
	"/glyphs/layers/shapes/nodes",
	"/glyphs/layers/shapes/piece",
	"/glyphs/layers/shapes/pos",
	"/glyphs/layers/shapes/ref",
	"/glyphs/layers/shapes/scale",
	"/glyphs/layers/shapes/slant",
	"/glyphs/layers/userData",
	"/glyphs/layers/vertOrigin",
	"/glyphs/layers/vertWidth",
	"/glyphs/layers/visible",
	"/glyphs/layers/width",
	"/glyphs/metricLeft",
	"/glyphs/metricRight",
	"/glyphs/metricWidth",
	"/glyphs/note",
	"/glyphs/partsSettings/bottomValue",
	"/glyphs/partsSettings/name",
	"/glyphs/partsSettings/topValue",
	"/glyphs/production",
	"/glyphs/script",
	"/glyphs/sortName",
	"/glyphs/sortNameKeep",
	"/glyphs/subCategory",
	"/glyphs/tags",
	"/glyphs/unicode",
	"/glyphs/userData",
	"/instances/axesValues",
	"/instances/customParameters",
	"/instances/exports",
	# "/instances/instanceInterpolations",
	"/instances/isBold",
	"/instances/isItalic",
	"/instances/linkStyle",
	"/instances/name",
	"/instances/properties/key",
	"/instances/properties/value",
	"/instances/properties/values/language",
	"/instances/properties/values/value",
	"/instances/type",
	"/instances/userData",
	"/instances/visible",
	"/instances/weightClass",
	"/instances/widthClass",
	"/kerningLTR",
	"/kerningRTL",
	"/kerningVertical",
	"/metrics/filter",
	"/metrics/name",
	"/metrics/type",
	"/note",
	"/numbers/name",
	"/properties/key",
	"/properties/value",
	"/properties/values/language",
	"/properties/values/value",
	# "/settings/disablesAutomaticAlignment",
	"/settings/disablesNiceNames",
	"/settings/fontType",
	"/settings/gridLength",
	"/settings/gridSubDivision",
	"/settings/keepAlternatesTogether",
	"/settings/keyboardIncrement",
	"/settings/keyboardIncrementBig",
	"/settings/keyboardIncrementHuge",
	"/settings/previewRemoveOverlap",
	"/stems/filter",
	"/stems/horizontal",
	"/stems/name",
	"/unitsPerEm",
	"/userData",
	"/versionMajor",
	"/versionMinor",
]

keyset = set()

keysFromFile("../GlyphsFileFormatv3.glyphs", keyset)

assert (len(keyset) > 100)

missingKeys = []
for key in allKeys:
	if key not in keyset:
		missingKeys.append(key)
if len(missingKeys) > 0:
	print("\n".join(missingKeys))
	print("\n%s from %s" % (len(missingKeys), len(allKeys)))
else:
	print("\nfound all %s keys" % len(allKeys))
