Skip to content

Instantly share code, notes, and snippets.

@anthrotype
Created January 30, 2020 15:27
Show Gist options
  • Save anthrotype/2539c6c6d56797b50abf19d64a4daee1 to your computer and use it in GitHub Desktop.
Save anthrotype/2539c6c6d56797b50abf19d64a4daee1 to your computer and use it in GitHub Desktop.
OTL json schema
# Common structure for GPOS, GSUB
{
"Version": int,
"Scripts": [
{
"Tag": str,
"DefaultLangSys": {
"ReqFeatureIndex": int, # is it always 0xFFFF?
"FeatureIndices": List[int]
},
"LangSysRecords": [
{
"Tag": str,
"LangSys": {
"ReqFeatureIndex": int,
"FeatureIndices": List[int],
}
},
]
},
],
"Features": [
{
"Tag": str,
"FeatureParams": Optional[FeatureParams],
"LookupListIndices": List[int],
},
],
"Lookups": [
{
"LookupType": int,
"LookupFlag": List[LookupFlag(Enum)],
"MarkFilteringSet": int, # index into GDEF.MarkFilteringSets
"Subtables": [
# ...
],
},
]
}
# GPOS
# Lookup type 2: PairPos
# PairPos format 2: Class to Class Positioning
{
"classes": {
"kern1.0": ["a", "b"],
"kern2.0": ["c", "d"],
"kern2.1": ["e", "f", "g"],
},
"values": {
"kern1.0": {
"kern2.0": -40,
"kern2.1": 10
},
"kern1.1": {
"kern2.0": 3,
"kern2.1": -4,
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment