[Lazarus] Font ligatures support

Martin Frb lazarus at mfriebe.de
Sat Oct 3 16:08:39 CEST 2020


On 02/10/2020 22:48, Sven Barth via lazarus wrote:
>
>> Are they strictly monospaced?
>
> Is there something that needs to be enabled to get ligatures working 
> on Windows? I'm using Microsoft's Cascadia Code for example in VS 2019 
> where ligatures work correctly, but in Lazarus nothing happens. The 
> ligatures have the same widths as the equal N characters (so the 
> ligature for <> has the same width as both characters together).
If you use the following to output on a plain canvas

procedure TForm1.FormPaint(Sender: TObject);
var
   r: TRect;
   s: String;
begin
   r.Top := 0;
   r.Left := 0;
   r.Bottom := 50;
   r.Right := 50;
   s := 'abcdef';
   LCLIntf.ExtUTF8Out(Canvas.Handle, 10, 10, ETO_OPAQUE+ETO_CLIPPED, @r, 
@s[1], 5, nil)

end;

Do you get the ligature?


More information about the lazarus mailing list