sbarex / SourceCodeSyntaxHighlight

Quick Look extension for highlight source code files on macOS 10.15 and later.
GNU General Public License v3.0
2.95k stars 71 forks source link

OpenType feature syntax support? #234

Closed frankrolf closed 1 year ago

frankrolf commented 1 year ago

I would love support for the OpenType feature syntax to be added.

This is an example file: https://github.com/adobe-fonts/source-serif/blob/main/Roman/familyGSUB.fea

Here is the kMDItemContentType for a .fea file:

kMDItemContentType     = "com.adobe.fea"
kMDItemContentTypeTree = (
    "com.adobe.fea",
    "public.text",
    "public.data",
    "public.item",
    "public.content"
)

This is the Feature File Specification: https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html

Here are some syntax highlighters for OpenType features: https://github.com/brew/opentype-feature-bundle https://github.com/wooorm/starry-night/blob/main/lang/source.opentype.js

As far as I can tell, OT feature syntax highlighting is supported on GitHub itself – not sure what highlighter is used here.

Please let me know how I can help, and thank you in advance!

frankrolf commented 1 year ago

Here is a related PR: https://github.com/rouge-ruby/rouge/pull/864

sbarex commented 1 year ago

The render engine (Highlight) do not support this format.

frankrolf commented 1 year ago

Thank you for pointing out this dependency – makes sense! Does this mean if I’d manage to convince the maintainers of Highlight, you might consider support for this format?

Thanks!

sbarex commented 1 year ago

Of course, adding support for a format supported by the Highlight engine is very simple.