[Lazarus] -dWINDOWS_LIGATURE [[Re: Font ligatures support]]

Martin Frb lazarus at mfriebe.de
Mon Oct 5 23:29:05 CEST 2020

On 05/10/2020 22:46, Sven Barth via lazarus wrote:
> I've tested it (with Cascadia Code) and while it shows the one or 
> other ligature, Visual Studio shows more.
> Take the following sequence:
> -> => >= <= *** .. ... <> >< >> << >>> <<< == !=

I found that if I put them into a string or comment, then they do all 
Equally if I switch off the Highlighter

Maybe the HL's tokenizer.
Could be the HL sees a - as one token, and has that printed individually.

So those tokens either need to be kept together (But pascal dictates the 
"-" as one token), or joined together again.
=> is one Pascal token
-> is not. The HL sees 2 tokens (never mind they make no sense in that 

Currently also ligatures do get broken, if you extend the selection, and 
have half of it selected.
That requires a rewrite of some parts of the painting code (needs to get 
into my TODO queue...)

More information about the lazarus mailing list