{ "name": "OpenType Feature File", "scopeName": "source.opentype", "fileTypes": [ "fea", "family" ], "patterns": [ { "include": "#main" } ], "repository": { "main": { "patterns": [ { "include": "#comments" }, { "include": "#target" }, { "include": "#blocks" }, { "include": "#keywords" }, { "include": "#tags" }, { "include": "#inclusion" }, { "include": "#strings" }, { "include": "#number" }, { "include": "#punctuation" }, { "include": "#identifier" } ] }, "comments": { "name": "comment.line.number-sign.opentype", "begin": "#", "end": "$", "beginCaptures": { "0": { "name": "punctuation.definition.comment.opentype" } } }, "blocks": { "patterns": [ { "name": "meta.feature.opentype", "begin": "(?<=^|[\\s{}])(feature)\\s+(\\w+)(?:\\s+(useExtension))?\\s*({)", "end": "(})\\s*(\\2)\\s*(?=[#;]|$)", "beginCaptures": { "1": { "name": "storage.type.var.feature.opentype" }, "2": { "name": "entity.name.feature.opentype" }, "3": { "name": "keyword.operator.opentype" }, "4": { "name": "punctuation.section.bracket.curly.begin.opentype" } }, "endCaptures": { "1": { "name": "punctuation.section.bracket.curly.end.opentype" }, "2": { "name": "entity.name.feature.opentype" } }, "patterns": [ { "name": "keyword.operator.opentype", "match": "(?<=^|[\\s{};])sizemenuname(?=[\\s#;]|$)" }, { "include": "$self" } ] }, { "name": "meta.lookup.opentype", "begin": "(?<=^|[\\s{}])(lookup)\\s+((?![\\d.])[A-Za-z0-9._]+)(?:\\s+(useExtension))?\\s*({)", "end": "(})\\s*(\\2)\\s*(?=[#;]|$)", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "storage.type.var.lookup.opentype" }, "2": { "name": "entity.name.lookup.opentype" }, "3": { "name": "keyword.operator.opentype" }, "4": { "name": "punctuation.section.bracket.curly.begin.opentype" } }, "endCaptures": { "1": { "name": "punctuation.section.bracket.curly.end.opentype" }, "2": { "name": "entity.name.lookup.opentype" } } }, { "name": "meta.table.opentype", "begin": "(?<=^|[\\s{};])(table)\\s+([\\w/]+)\\s*({)", "end": "(})\\s*(\\2)\\s*(?=[#;]|$)", "beginCaptures": { "1": { "name": "storage.type.var.table.opentype" }, "2": { "name": "entity.name.table.opentype" }, "3": { "name": "punctuation.section.bracket.curly.begin.opentype" } }, "endCaptures": { "1": { "name": "punctuation.section.bracket.curly.end.opentype" }, "2": { "name": "entity.name.table.opentype" } }, "patterns": [ { "name": "keyword.operator.table-field.opentype", "match": "(?x) (?<=^|[\\s{};])\n(GlyphClassDef|Attach|LigatureCaretBy(?:Dev|Index|Pos)|MarkAttachClass\n|(?:Horiz|Vert)Axis\\.(?:BaseTagList|BaseScriptList|MinMax)|FontRevision\n|CaretOffset|Ascender|Descender|LineGap|Panose|TypoAscender|TypoDescender\n|TypoLineGap|winAscent|winDescent|UnicodeRange|CodePageRange|XHeight|CapHeight\n|Vendor|VertTypoAscender|VertTypoDescender|VertTypoLineGap|VertOriginY|VertAdvanceY)\n(?=[\\s#;]|$)" }, { "include": "$self" } ] }, { "begin": "(?<=^|[\\s{};])(anonymous|anon)\\s+([\\w.]+)\\s*({)", "end": "(})\\s*(\\2)\\s*(;)", "contentName": "string.unquoted.heredoc.opentype", "beginCaptures": { "1": { "name": "storage.type.var.opentype" }, "2": { "name": "entity.name.anon-tag.opentype" }, "3": { "name": "punctuation.section.bracket.curly.begin.opentype" } }, "endCaptures": { "1": { "name": "punctuation.section.bracket.curly.end.opentype" }, "2": { "name": "entity.name.anon-tag.opentype" }, "3": { "name": "punctuation.terminator.statement.opentype" } } }, { "name": "meta.cv-params.opentype", "begin": "(?<=^|[\\s{}])(cvParameters)\\s*({)", "end": "(})", "beginCaptures": { "1": { "name": "storage.type.var.opentype" }, "2": { "name": "punctuation.section.bracket.curly.begin.opentype" } }, "endCaptures": { "1": { "name": "punctuation.section.bracket.curly.end.opentype" } }, "patterns": [ { "name": "meta.cv-param.$1.opentype", "begin": "(?<=^|[\\s{}])(FeatUILabelNameID|FeatUITooltipTextNameID|SampleTextNameID|ParamUILabelNameID)\\s*({)", "end": "(})", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "keyword.operator.parameter.opentype" }, "2": { "name": "punctuation.section.bracket.curly.begin.opentype" } }, "endCaptures": { "1": { "name": "punctuation.section.bracket.curly.end.opentype" } } }, { "name": "keyword.operator.parameter.opentype", "match": "(?<=\\s|^)Character(?=\\s|$|#)" }, { "include": "$self" } ] }, { "name": "meta.$1.opentype", "begin": "(?<=^|[\\s{}])(featureNames)\\s*({)", "end": "(})", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "storage.type.var.opentype" }, "2": { "name": "punctuation.section.bracket.curly.begin.opentype" } }, "endCaptures": { "1": { "name": "punctuation.section.bracket.curly.end.opentype" } } } ] }, "identifier": { "name": "variable.parameter.opentype", "match": "(\\\\)?(@)?(?![\\d.])[A-Za-z0-9._]+", "captures": { "1": { "name": "punctuation.definition.backslash.opentype" }, "2": { "name": "punctuation.definition.glyph-class.opentype" } } }, "keywords": { "patterns": [ { "name": "invalid.deprecated.keyword.opentype", "match": "(?<=^|[\\s{};])(excludeDFLT|includeDFLT)(?=$|[\\s{}#;])" }, { "name": "constant.language.null.opentype", "match": "(?<=^|[\\s{};])NULL(?=[\\s{}#;]|$)" }, { "name": "storage.type.var.name.opentype", "match": "(?<=^|[\\s{};])name(?=[\\s{}#;]|$)" }, { "name": "support.constant.language.opentype", "match": "(?", "name": "punctuation.section.bracket.angle.end.opentype" }, { "match": "\\[", "name": "punctuation.section.bracket.square.begin.opentype" }, { "match": "\\]", "name": "punctuation.section.bracket.square.end.opentype" }, { "match": "\\(", "name": "punctuation.section.bracket.round.begin.opentype" }, { "match": "\\)", "name": "punctuation.section.bracket.round.end.opentype" } ] }, "strings": { "patterns": [ { "name": "string.quoted.double.opentype", "begin": "\"", "end": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.opentype" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.opentype" } }, "patterns": [ { "match": "\\\\[A-Fa-f0-9]{1,4}", "name": "constant.character.escape.codepoint.opentype" } ] } ] }, "tags": { "patterns": [ { "name": "support.constant.language.tag.feature.opentype", "match": "(?x) (?<=^|[\\s{};])\n(aalt|abvf|abvm|abvs|afrc|akhn|blwf|blwm|blws|calt|case|ccmp|cfar|cjct|clig|cpct|cpsp\n|cswh|curs|cv[0-9]{2}|c2pc|c2sc|dist|dlig|dnom|dtls|expt|falt|fin2|fin3|fina|flac|frac\n|fwid|half|haln|halt|hist|hkna|hlig|hngl|hojo|hwid|init|isol|ital|jalt|jp78|jp83|jp90\n|jp04|kern|lfbd|liga|ljmo|lnum|locl|ltra|ltrm|mark|med2|medi|mgrk|mkmk|mset|nalt|nlck\n|nukt|numr|onum|opbd|ordn|ornm|palt|pcap|pkna|pnum|pref|pres|pstf|psts|pwid|qwid|rand\n|rclt|rkrf|rlig|rphf|rtbd|rtla|rtlm|ruby|rvrn|salt|sinf|size|smcp|smpl|ss[0-9]{2}|ssty\n|stch|subs|sups|swsh|titl|tjmo|tnam|tnum|trad|twid|unic|valt|vatu|vert|vhal|vjmo|vkna\n|vkrn|vpal|vrt2|vrtr|zero)\n(?=[\\s#;]|$)" }, { "name": "support.constant.language.tag.script.opentype", "match": "(?x) (?<=^|[\\s{};])\n(arab|armn|avst|bali|bamu|batk|beng|bng2|bopo|brah|brai|bugi|buhd|byzm|cans|cari|cakm\n|cham|cher|hani|copt|cprt|cyrl|DFLT|dsrt|deva|dev2|egyp|ethi|geor|glag|goth|grek|gujr\n|gjr2|guru|gur2|hang|jamo|hano|hebr|kana|armi|phli|prti|java|kthi|knda|knd2|kana|kali\n|khar|khmr|lao|latn|lepc|limb|linb|lisu|lyci|lydi|mlym|mlm2|mand|math|mtei|merc|mero\n|plrd|mong|musc|mymr|mym2|talu|nko|ogam|olck|ital|xpeo|sarb|orkh|orya|ory2|osma|phag\n|phnx|rjng|runr|samr|saur|shrd|shaw|sinh|sora|xsux|sund|sylo|syrc|tglg|tagb|tale|lana\n|tavt|takr|taml|tml2|telu|tel2|thaa|thai|tibt|tfng|ugar|vai|yi)\n(?=[\\s#;]|$)" }, { "name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HI|SGS|SGO|SGA|SEL|TIV|TIB|THT|THA|TGY|TGR|TGN|TGL|TET|TEL|TDD\n|TCR|TAT|TAM|TAJ|TAB|SZL|SYR|SYL|SXU|SXT|SWZ|SWK|SWA|SVE|SVA|SUR|SUN|SUK|STQ|VIT|VEN\n|VEC|UZB|UYG|USB|URD|UMB|UKR|UDM|TZO|TZM|TYZ|TWI|TVL|TUV|TUM|TUL|TUA|TSG|TRK|TPI|TOD0\n|TOD|TNG|TNE|TNA|TMN|TMH|TKM|ZUL|ZZA|dflt)\n(?=[\\s#;]|$)" }, { "name": "support.constant.language.tag.baseline.opentype", "match": "(?<=^|[\\s{};])(hang|icfb|icft|ideo|idtp|math|romn)(?=[\\s#;]|$)" } ] }, "target": { "match": "(\\\\)?(@)?(?![\\d.])[A-Za-z0-9._]+(')", "name": "entity.name.subject.opentype", "captures": { "1": { "name": "punctuation.definition.backslash.opentype" }, "2": { "name": "punctuation.definition.context-mark.opentype" }, "3": { "name": "punctuation.definition.glyph-class.opentype" } } } } }