Skip to content

Instantly share code, notes, and snippets.

@MihailJP
Created July 13, 2024 02:19
Show Gist options
  • Save MihailJP/2ba4d5367b3a52f0591cad8db1c74efe to your computer and use it in GitHub Desktop.
Save MihailJP/2ba4d5367b3a52f0591cad8db1c74efe to your computer and use it in GitHub Desktop.
Kate syntax highlighting definition file for FontForge SFD
<?xml version="1.0" encoding="UTF-8"?>
<language name="Spline Font Database" section="Other" version="1.00" extensions="*.sfd;*.glyph;font.props;*.bitmap;strike.props" kateversion="3.9" mimetype="application/vnd.font-fontforge-sfd">
<highlighting>
<contexts>
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
<WordDetect String="SplineFontDB:" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="SFD"/>
<WordDetect String="EndSplineFont" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="SFD"/>
<WordDetect String="BeginPrivate:" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="Private"/>
<WordDetect String="EndPrivate" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="Private"/>
<WordDetect String="BeginChars:" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="Chars"/>
<WordDetect String="EndChars" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="Chars"/>
<WordDetect String="StartChar:" context="ChrName" firstNonSpace="true" attribute="Keyword" beginRegion="Char"/>
<WordDetect String="EndChar" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="Char"/>
<WordDetect String="Grid" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="SplineSet"/>
<WordDetect String="SplineSet" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="SplineSet"/>
<WordDetect String="EndSplineSet" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="SplineSet"/>
<WordDetect String="ShortTable:" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="ShortTable"/>
<WordDetect String="EndShort" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="ShortTable"/>
<WordDetect String="Justify:" context="#stay" firstNonSpace="true" attribute="Keyword"/>
<WordDetect String="EndJustify" context="#stay" firstNonSpace="true" attribute="Keyword"/>
<RegExpr String="(ContextPos|ContextSub|ChainPos|ChainSub|ReverseChain)2?:" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="FPST"/>
<WordDetect String="EndFPST" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="FPST"/>
<RegExpr String="(MacIndic|MacContext|MacInsert|MacKern)2?:" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="ASM"/>
<WordDetect String="EndASM" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="ASM"/>
<WordDetect String="BDFStartProperties:" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="BDFprop"/>
<WordDetect String="BDFEndProperties" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="BDFprop"/>
<WordDetect String="BitmapFont:" context="bdfparm" firstNonSpace="true" attribute="Keyword" beginRegion="BDF"/>
<WordDetect String="BDFChar" context="bdfparm" firstNonSpace="true" attribute="Keyword"/>
<RegExpr String="MM(CDV|NDV):" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="MM"/>
<WordDetect String="EndMMSubroutine" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="MM"/>
<WordDetect String="FontName:" context="strfield" firstNonSpace="true" attribute="Property Name"/>
<WordDetect String="FullName:" context="strfield" firstNonSpace="true" attribute="Property Name"/>
<WordDetect String="FamilyName:" context="strfield" firstNonSpace="true" attribute="Property Name"/>
<WordDetect String="Weight:" context="strfield" firstNonSpace="true" attribute="Property Name"/>
<WordDetect String="Copyright:" context="strfield" firstNonSpace="true" attribute="Property Name"/>
<WordDetect String="OS2CodePages:" context="hexfield" firstNonSpace="true" attribute="Property Name"/>
<WordDetect String="OS2UnicodeRanges:" context="hexfield" firstNonSpace="true" attribute="Property Name"/>
<WordDetect String="Image:" context="blobparm" firstNonSpace="true" attribute="Keyword" beginRegion="Blob"/>
<WordDetect String="TtfInstrs:" context="blobparm" firstNonSpace="true" attribute="Keyword" beginRegion="Blob"/>
<WordDetect String="TtInstrs:" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="TtInstrs"/>
<WordDetect String="EndTTInstrs" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="TtInstrs"/>
<WordDetect String="Spiro" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="Spiro"/>
<WordDetect String="EndSpiro" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="Spiro"/>
<DetectChar attribute="String" context="string" char="&quot;"/>
<DetectChar attribute="OpenType Tag" context="tag" char="'"/>
<RegExpr String="[[:alpha:]]\w*\b:?" context="#stay" firstNonSpace="true" attribute="Property Name"/>
<HlCHex attribute="Hex" context="#stay"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
</context>
<context name="ChrName" attribute="String" lineEndContext="CharData"/>
<context name="CharData" attribute="Normal Text" lineEndContext="#stay">
<WordDetect String="Fore" context="#stay" firstNonSpace="true" attribute="Keyword"/>
<WordDetect String="Back" context="#stay" firstNonSpace="true" attribute="Keyword"/>
<WordDetect String="Layer:" context="#stay" firstNonSpace="true" attribute="Keyword"/>
<WordDetect String="SplineSet" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="SplineSet"/>
<WordDetect String="EndSplineSet" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="SplineSet"/>
<WordDetect String="TtInstrs:" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="TtInstrs"/>
<WordDetect String="EndTTInstrs" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="TtInstrs"/>
<WordDetect String="Spiro" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="Spiro"/>
<WordDetect String="EndSpiro" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="Spiro"/>
<WordDetect String="EndChar" context="#pop#pop" firstNonSpace="true" attribute="Keyword" endRegion="Char"/>
<DetectChar attribute="String" context="string" char="&quot;"/>
<DetectChar attribute="OpenType Tag" context="tag" char="'"/>
<RegExpr String="[[:alpha:]]\w*\b:?" context="#stay" firstNonSpace="true" attribute="Property Name"/>
<HlCHex attribute="Hex" context="#stay"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
</context>
<context name="string" attribute="String" lineEndContext="#pop">
<HlCStringChar attribute="String Char" context="#stay"/>
<DetectChar attribute="String" context="#pop" char="&quot;"/>
<RegExpr String="\+[[:alnum:]/+]*-" attribute="UTF7 Encoded"/>
<RegExpr String="\+[[:alnum:]/+]+\b" attribute="UTF7 Encoded"/>
</context>
<context name="strfield" attribute="String" lineEndContext="#pop">
<HlCStringChar attribute="String Char" context="#stay"/>
<RegExpr String="\+[[:alnum:]/+]*-" attribute="UTF7 Encoded"/>
<RegExpr String="\+[[:alnum:]/+]+\b" attribute="UTF7 Encoded"/>
</context>
<context name="hexfield" attribute="Normal Text" lineEndContext="#pop">
<RegExpr attribute="Hex" String="[[:xdigit:]]+" insensitive="true" context="#stay"/>
</context>
<context name="tag" attribute="OpenType Tag" lineEndContext="#pop">
<DetectChar attribute="OpenType Tag" context="#pop" char="'"/>
</context>
<context name="blobparm" attribute="Normal Text" lineEndContext="blob">
<HlCHex attribute="Hex" context="#stay"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
</context>
<context name="blob" attribute="Encoded Blob" lineEndContext="#stay">
<WordDetect String="EndImage" context="#pop#pop" firstNonSpace="true" attribute="Keyword" endRegion="Blob"/>
<WordDetect String="EndTtf" context="#pop#pop" firstNonSpace="true" attribute="Keyword" endRegion="Blob"/>
</context>
<context name="parm" attribute="Normal Text" lineEndContext="#pop">
<HlCHex attribute="Hex" context="#stay"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
</context>
<context name="bdfparm" attribute="Normal Text" lineEndContext="bdf">
<HlCHex attribute="Hex" context="#stay"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
</context>
<context name="bdf" attribute="Encoded Blob" lineEndContext="#stay">
<WordDetect String="BDFChar" context="parm" firstNonSpace="true" attribute="Keyword"/>
<WordDetect String="EndBitmapFont" context="#pop#pop" firstNonSpace="true" attribute="Keyword" endRegion="BDF"/>
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
<itemData name="Keyword" defStyleNum="dsKeyword"/>
<itemData name="Property Name" defStyleNum="dsFunction"/>
<itemData name="String" defStyleNum="dsString"/>
<itemData name="UTF7 Encoded" defStyleNum="dsChar" italic="true" spellChecking="false"/>
<itemData name="String Char" defStyleNum="dsChar" spellChecking="false"/>
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="OpenType Tag" defStyleNum="dsChar" spellChecking="false"/>
<itemData name="Encoded Blob" defStyleNum="dsNormal" spellChecking="false"/>
</itemDatas>
</highlighting>
<general>
<comments/>
<keywords casesensitive="false"/>
</general>
</language>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment