[Lazarus] Font ligatures support

Mr Bee pak.lebah at yahoo.com
Sun Oct 4 10:14:48 CEST 2020


If it does work, would you please submit it as a patch for the next release? At least, add a note that the font ligatures feature only supports monospaced fonts and only works on Windows. It's better than nothing.
Thank you.
–Mr Bee
 

    Pada Sabtu, 3 Oktober 2020 22.37.58 WIB, Martin Frb via lazarus <lazarus at lists.lazarus-ide.org> menulis:  
 
  On 03/10/2020 16:34, Alexey Tor. via lazarus wrote:
  
It's not very simple. see file 
https://github.com/Alexey-T/ATSynEdit/blob/master/atsynedit/atsynedit_canvasproc.pas 
 and search for "ligatures" in all places. Unit has special code for win32. 
 
 
 Actually might be easier than thought....
 
 
|  
  |
|
|  if GetCharacterPlacementW(DC, PWChar(Str), Length(Str), 0, @CharPlaceInfo, GCP_LIGATE)<> 0 then |
|
|  Result:= Windows.ExtTextOutW(DC, X, Y, ETO_CLIPPED or ETO_OPAQUE or ETO_GLYPH_INDEX, Rect, Pointer(Glyphs), Length(Glyphs), Dx) |
|
|  else |
|
|  Result:= Windows.ExtTextOutW(DC, X, Y, ETO_CLIPPED or ETO_OPAQUE, Rect, PWChar(Str), Length(Str), Dx); |
|

 
 
 - If indeed the DX array is still applicable with the glyphs....
 - And if that is supported on all widgetsets...
 - And as long as the font does still behave monospaced ...
 
 -- 
_______________________________________________
lazarus mailing list
lazarus at lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20201004/6792354f/attachment.html>


More information about the lazarus mailing list