Built-in syntax highlight #224
Replies: 2 comments 4 replies
-
I am rather skeptical... this feels out-of-scope for a font. As both you and the article mention, it can only support the most basic of syntax, so anything complex will be full of false-positives that will have to be tweaked meticulously: in most scenarios, an external highlighting tool will have to be brought in anyways. That means that the font file will end up bloated with lots of complex ligatures only to serve a very small use-case. Even if this feature is moved to a separate font file, it will make maintaining the font more complicated! 😧 I feel like it would be more worthwhile to spend the effort on perfecting a single, versatile font that works well with dedicated highlighting methods, new or existing. Although, this is just my gut reaction. I am happy to be convined otherwise. 🙂 |
Beta Was this translation helpful? Give feedback.
-
Really like this font. Hopefully a non-hyphenated version will be released. 😹 |
Beta Was this translation helpful? Give feedback.
-
https://blog.glyphdrawing.club/font-with-built-in-syntax-highlighting/
Principle
Write a large amount of ligature rules to match keywords and some simple patterns.
Some Thoughts
COLR
andCALT
tables are used to match and replace colored characters.It is well performed on
html
andcss
, but due to the limitation of ligature, it seems impossible to render complex syntax using regular expression.Also,
COLR
table support is poor, especially in desktop application. So maybe the only usage scenario is web?Beta Was this translation helpful? Give feedback.
All reactions