Jump to content

Turbo SynEdit & Font Ligatures

Recommended Posts

Development of SynEdit at PyScripter has been moved to and merged with TurboPack SynEdit.  The focus of the development is to modernize the code base and enhance the functionality (sometimes at the expense of backward compatibility).  In addition to the earlier enhancements  and fixes two more features have been recently added:

  • Per-monitor DPI awareness
  • Support for Font Ligatures (new option eoShowLigatures)


Fonts like Cascadia Code and Fira Code contain ligatures relevant to programming. See this article for details.  Are you using font ligatures?  Do you like them?


See sample.  Thanks to vhanla for contributing the ligature support.

Edited by pyscripter
  • Like 7
  • Thanks 1

Share this post

Link to post

My goto has been Consolas, but this change seems a good one!  I'll have to look into those fonts.  BTW, having recently started to use Delphi Styles I'd love to see SynEdit support them.  Fortunately I get around it by adding:


  TCustomStyleEngine.RegisterStyleHook(TCustomSynEdit, TMemoStyleHook); // to get styled scrollbars

And then either changing the all the colors whenever the style changes OR by using the Vcl.Styles.Hooks unit.  I usually go with the hooks since I use a couple other controls that don't support styles fully (like spTbxDock and spTbxToolbar, which I've noticed you're doing some much needed work on!)  Fantastic work!

Share this post

Link to post
On 10/15/2022 at 12:23 PM, David Heffernan said:

Not supported by the IDE

Unless you've discovered the magic key to unlock it:


Share this post

Link to post
8 hours ago, David Heffernan said:


The trigger is the presence of the "⁄" character anywhere in the text. It's the Unicode "Fraction Slash".

It can be reproduced with the GDI ExtTextOut function, which is how I accidentally discovered it.



I suspect that this is actually a bug in GDI because as far as I can tell there's nothing in the font tables that should require that character to be present before ligatures are applied. It could also be a bug in the font that triggers a bug in GDI; There are a lot of bugs in Cascadia and Fira.


Normally, in an OpenType shaper, the fraction slash triggers hardcoded logic ("hardcoded" as in "logic not defined in the OpenType tables") that converts numeric fractions from the form 1/2 to ½ but that requires the 'frac' feature to be enabled which it isn't by default.


Share this post

Link to post
5 minutes ago, Anders Melander said:

The trigger is the presence of the "⁄" character anywhere in the text.

That's pretty funky. Sadly not practical for actual use.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now