Skip to content

Instantly share code, notes, and snippets.

@MihailJP
Created July 13, 2024 02:18
Show Gist options
  • Save MihailJP/a279dd15cc54620f5eb08bcb2b8fd401 to your computer and use it in GitHub Desktop.
Save MihailJP/a279dd15cc54620f5eb08bcb2b8fd401 to your computer and use it in GitHub Desktop.
Kate syntax highlighting definition file for BDF (bitmap font)
<?xml version="1.0" encoding="UTF-8"?>
<language name="Glyph Bitmap Distribution Format" section="Other" version="1.00" extensions="*.bdf" kateversion="3.9" mimetype="application/x-font-bdf">
<highlighting>
<list name="keywords">
<item> COMMENT </item>
<item> CONTENTVERSION </item>
<item> SIZE </item>
<item> FONTBOUNDINGBOX </item>
<item> METRICSSET </item>
<item> SWIDTH </item>
<item> DWIDTH </item>
<item> SWIDTH1 </item>
<item> DWIDTH1 </item>
<item> VVECTOR </item>
<item> CHARS </item>
<item> ENCODING </item>
<item> SWIDTH </item>
<item> DWIDTH </item>
<item> SWIDTH1 </item>
<item> DWIDTH1 </item>
<item> BBX </item>
</list>
<contexts>
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
<WordDetect String="STARTFONT" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="Font"/>
<WordDetect String="ENDFONT" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="Font"/>
<WordDetect String="STARTCHAR" context="#stay" firstNonSpace="true" attribute="Keyword" beginRegion="Char"/>
<WordDetect String="ENDCHAR" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="Char"/>
<WordDetect String="STARTPROPERTIES" context="props" firstNonSpace="true" attribute="Keyword" beginRegion="Prop"/>
<WordDetect String="ENDPROPERTIES" context="#stay" firstNonSpace="true" attribute="Keyword" endRegion="Prop"/>
<WordDetect String="BITMAP" context="Bitmap" firstNonSpace="true" attribute="Keyword"/>
<WordDetect String="FONT" context="FontName" firstNonSpace="true" attribute="Property Name"/>
<keyword String="keywords" context="#stay" firstNonSpace="true" attribute="Property Name"/>
<DetectChar attribute="String" context="string" char="&quot;"/>
<RegExpr String="\S+" context="#stay" firstNonSpace="true" attribute="Error"/>
<HlCHex attribute="Hex" context="#stay"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
</context>
<context name="Bitmap" attribute="Error" lineEndContext="#stay">
<RegExpr String="[[:xdigit:]]+\s*$" context="#stay" firstNonSpace="true" attribute="Normal Text"/>
<WordDetect String="ENDCHAR" context="#pop" firstNonSpace="true" attribute="Keyword" endRegion="Char"/>
</context>
<context name="FontName" attribute="Normal Text" lineEndContext="#pop">
<DetectIdentifier attribute="String" 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;"/>
</context>
<context name="props" attribute="Normal Text" lineEndContext="#stay">
<WordDetect String="ENDPROPERTIES" context="#pop" firstNonSpace="true" attribute="Keyword" endRegion="Prop"/>
<RegExpr String="[[:upper:]][[:upper:][:digit:]_]*\b" context="#stay" firstNonSpace="true" attribute="Property Name"/>
<RegExpr String="\S+" context="#stay" firstNonSpace="true" attribute="Error"/>
<DetectChar attribute="String" context="string" char="&quot;"/>
<HlCStringChar attribute="String Char" context="#stay"/>
<HlCHex attribute="Hex" context="#stay"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
</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="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="Error" defStyleNum="dsError" 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