[Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]

Martin Frb lazarus at mfriebe.de
Wed Oct 7 13:23:19 CEST 2020

On 07/10/2020 01:42, Maxim Ganetsky via lazarus wrote:
> 06.10.2020 16:23, Martin Frb via lazarus пишет:
>> On 06/10/2020 15:09, Maxim Ganetsky via lazarus wrote:
>>> ----
>>> Can you try to catch it in the debugger, and see what params are given
>>> to NewTextOut
>>> in
>>> parentfp=0x13abf6e8)
>>>      at lazsyntextarea.pp:1741
>>>   fTextDrawer.NewTextOut(TxtLeft, rcToken.Top, TxtFlags, tok,
>>> ATokenInfo.Tk.TokenStart, ATokenInfo.Tk.TokenLength, FEtoBuf);
>>> Can you add some debugln in a format convenient to you? This will
>>> simplify things, I think.
>> This is in the paint handler, and it is called for each token. So 
>> potentially very slow with debugln.
>> But since it is in startup, hopefully you wont have to many.
>> Apply this patch please
> With this patch applied Lazarus seems to crash on debugln in 
> lazsyntextarea.pp. Just in case, I tried to remove this particular 
> debugln, then it printed 'BEFORE' and nothing more.

Sorry my fault, I thought I had all the nil checks....
Please replace that debugln with

debugln('Calling NewTextOut L: %s rcT: %s tok: %s tkt: %s // %s // eto: 
%s', [dbgs(TxtLeft), dbgs(rcToken), dbgs(tok), 
dbgMemRange(PByte(ATokenInfo.Tk.TokenStart), ATokenInfo.Tk.TokenLength), 
dbgs(ATokenInfo.Tk.TokenLength), dbgs(FEtoBuf<>nil) ]);

More information about the lazarus mailing list