mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 14:59:15 +02:00
SynEdit: More Ligatures on Windows, {$DEFINE WINDOWS_LIGATURE}
git-svn-id: trunk@63963 -
This commit is contained in:
parent
41552a49c8
commit
410dd26d95
@ -1259,15 +1259,18 @@ begin
|
|||||||
EtoArray := nil;
|
EtoArray := nil;
|
||||||
|
|
||||||
{$IFDEF WINDOWS_LIGATURE}
|
{$IFDEF WINDOWS_LIGATURE}
|
||||||
W := UTF8ToUTF16(Text, ALength);
|
if ALength > 0 then begin
|
||||||
ZeroMemory(@CharPlaceInfo, SizeOf(CharPlaceInfo));
|
W := UTF8ToUTF16(Text, ALength);
|
||||||
CharPlaceInfo.lStructSize:= SizeOf(CharPlaceInfo);
|
ZeroMemory(@CharPlaceInfo, SizeOf(CharPlaceInfo));
|
||||||
SetLength(Glyphs, Length(W));
|
CharPlaceInfo.lStructSize:= SizeOf(CharPlaceInfo);
|
||||||
CharPlaceInfo.lpGlyphs:= @Glyphs[0];
|
SetLength(Glyphs, Length(W));
|
||||||
CharPlaceInfo.nGlyphs:= Length(Glyphs);
|
CharPlaceInfo.lpGlyphs:= @Glyphs[0];
|
||||||
if GetCharacterPlacementW(FDC, PWChar(W), Length(W), 0, CharPlaceInfo, GCP_LIGATE)<> 0 then begin
|
CharPlaceInfo.nGlyphs:= Length(Glyphs);
|
||||||
Windows.ExtTextOutW(FDC, X, Y, fuOptions or ETO_GLYPH_INDEX, @ARect, Pointer(Glyphs), Length(Glyphs), EtoArray);
|
Glyphs[0] := #0;
|
||||||
exit;
|
if GetCharacterPlacementW(FDC, PWChar(W), Length(W), 0, CharPlaceInfo, GCP_LIGATE or GCP_REORDER or GCP_GLYPHSHAPE)<> 0 then begin
|
||||||
|
Windows.ExtTextOutW(FDC, X, Y, fuOptions or ETO_GLYPH_INDEX, @ARect, Pointer(Glyphs), CharPlaceInfo.nGlyphs, EtoArray);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user