Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
09.10.2020 5:33, Martin Frb via lazarus пишет: It might be dead simple (at least I hope) {$IFDEF WINDOWS_LIGATURE} function GetCharacterPlacementW(hdc: HDC; lpString: LPCWSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSW; dwFlags: DWORD): DWORD; stdcall; external 'gdi32' name 'GetCharacterPlacementW'; {$ENDIF} Add stdcall. At least on win10 that makes 32bit working. Not booting up win 7 again. Yes, my IDE is 32 bit. It works now correctly for me on Win7 too. Thanks! -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
On 09.10.2020 14:11, Martin Frb via lazarus wrote: On 09/10/2020 09:06, Ondrej Pokorny via lazarus wrote: But the ligatures are not very promising. I get ':=' as ligature but nothing else. You probably will see more inside comments or strings, or if the highlighter is off. In my tests, I did get in normal pascal source <= >= .. But not ... or => The latter are not a single token to the highlighter, so they get broken into text fragments. Ah, that's true. Ondrej -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
On 09/10/2020 09:06, Ondrej Pokorny via lazarus wrote: But the ligatures are not very promising. I get ':=' as ligature but nothing else. You probably will see more inside comments or strings, or if the highlighter is off. In my tests, I did get in normal pascal source <= >= .. But not ... or => The latter are not a single token to the highlighter, so they get broken into text fragments. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
Op 2020-10-09 om 04:33 schreef Martin Frb via lazarus: I took the declaration from the windows units in fpc => which has some wrongly typed params that I adjusted. But it also does not have stdcall. Windows unit has {$calling stdcall} globally -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
On 9-10-2020 04:33, Martin Frb via lazarus wrote: It might be dead simple (at least I hope) {$IFDEF WINDOWS_LIGATURE} function GetCharacterPlacementW(hdc: HDC; lpString: LPCWSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSW; dwFlags: DWORD): DWORD; stdcall; external 'gdi32' name 'GetCharacterPlacementW'; {$ENDIF} Add stdcall. At least on win10 that makes 32bit working. Not booting up win 7 again. I took the declaration from the windows units in fpc => which has some wrongly typed params that I adjusted. But it also does not have stdcall. All winapi calls should have stdcall, at least the ones without are suspicious (iirc for win64 we use the same calling convention so you might not notice) Marc -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
On 09.10.2020 04:33, Martin Frb via lazarus wrote: It might be dead simple (at least I hope) {$IFDEF WINDOWS_LIGATURE} function GetCharacterPlacementW(hdc: HDC; lpString: LPCWSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSW; dwFlags: DWORD): DWORD; stdcall; external 'gdi32' name 'GetCharacterPlacementW'; {$ENDIF} Add stdcall. Yes, the stdcall fixes the crash for me on Windows 10 64bit & Lazarus IDE 32bit. But the ligatures are not very promising. I get ':=' as ligature but nothing else. Ondrej -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
It might be dead simple (at least I hope) {$IFDEF WINDOWS_LIGATURE} function GetCharacterPlacementW(hdc: HDC; lpString: LPCWSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSW; dwFlags: DWORD): DWORD; stdcall; external 'gdi32' name 'GetCharacterPlacementW'; {$ENDIF} Add stdcall. At least on win10 that makes 32bit working. Not booting up win 7 again. I took the declaration from the windows units in fpc => which has some wrongly typed params that I adjusted. But it also does not have stdcall. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
On 09/10/2020 03:14, Martin Frb via lazarus wrote: On 09/10/2020 00:55, Maxim Ganetsky via lazarus wrote: Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=i386-win32-win32 New=i386-win 32-win32 Changed: OS/CPU=True LCL=False Calling NewTextOut L: 71 rcT: l=71,t=36,r=85,b=54 tok: l=71,t=36,r=85,b=54 tkt: 2020 // 2 // eto: False BEFORE That output looks all ok. I concluded from the output that you have a 32 bit IDE. So I checked => 32 bit IDE crashes for me too. From the bit of debugging I have done, this may be a stack corruption. I had cases where the OS returned to NewTextOut (even though indicating that GetCharacterPlacementW failed), but NewTextOut crashed on exit. (either in its internal finally handler, or on actually returning to parent) Interestingly on Win10 a 32bit IDE - while not crashing - does not display ligatures. The call to GetCharacterPlacementW returns failed. One more think Lazarus build with 32bit 3.0.4 on win 7 does not crash. (But ligatures do not work either). -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
On 09/10/2020 00:55, Maxim Ganetsky via lazarus wrote: Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=i386-win32-win32 New=i386-win 32-win32 Changed: OS/CPU=True LCL=False Calling NewTextOut L: 71 rcT: l=71,t=36,r=85,b=54 tok: l=71,t=36,r=85,b=54 tkt: 2020 // 2 // eto: False BEFORE That output looks all ok. I concluded from the output that you have a 32 bit IDE. So I checked => 32 bit IDE crashes for me too. From the bit of debugging I have done, this may be a stack corruption. I had cases where the OS returned to NewTextOut (even though indicating that GetCharacterPlacementW failed), but NewTextOut crashed on exit. (either in its internal finally handler, or on actually returning to parent) Interestingly on Win10 a 32bit IDE - while not crashing - does not display ligatures. The call to GetCharacterPlacementW returns failed. Anyway, I squeezed this in, under the assumption it might be a quick solution. So this will have to go back on the todo list. If someone has any worthwhile idea what might cause the issue -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
07.10.2020 14:23, Martin Frb via lazarus пишет: 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 #2 0x00ab95f6 in DRAWHILIGHTMARKUPTOKEN (ATOKENINFO=..., 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) ]); I got the following output: i:\FPC\lazarus>lazarus Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="C:\Users\Maxim \AppData\Local\lazarus" Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="i:\FPC\lazar us" Hint: (lazarus) [TMainIDE.LoadGlobalOptions] Hint: (lazarus) LastCalled="I:\FPC\lazarus\lazarus.old.working.exe" Hint: (lazarus) CurPrgName="i:\FPC\lazarus\lazarus.exe" Hint: (lazarus) AltPrgName="C:\Users\Maxim\AppData\Local\lazarus\bin\lazarus.exe " Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=i386-win32-win32 New=i386-win 32-win32 Changed: OS/CPU=True LCL=False Calling NewTextOut L: 71 rcT: l=71,t=36,r=85,b=54 tok: l=71,t=36,r=85,b=54 tkt: 2020 // 2 // eto: False BEFORE -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
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 #2 0x00ab95f6 in DRAWHILIGHTMARKUPTOKEN (ATOKENINFO=..., 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) ]); -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
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 #2 0x00ab95f6 in DRAWHILIGHTMARKUPTOKEN (ATOKENINFO=..., 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. i:\FPC\lazarus>lazarus --debug-output=.\dbgoutput.txt Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="C:\Users\Maxim \AppData\Local\lazarus" Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="i:\FPC\lazar us" Hint: (lazarus) [TMainIDE.LoadGlobalOptions] Hint: (lazarus) LastCalled="I:\FPC\lazarus\lazarus.old.working.exe" Hint: (lazarus) CurPrgName="i:\FPC\lazarus\lazarus.exe" Hint: (lazarus) AltPrgName="C:\Users\Maxim\AppData\Local\lazarus\bin\lazarus.exe " Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=i386-win32-win32 New=i386-win 32-win32 Changed: OS/CPU=True LCL=False TApplication.HandleException: EAccessViolation Access violation Stack trace: $00C12B2D DRAWHILIGHTMARKUPTOKEN, line 1740 of lazsyntextarea.pp $00C11C76 PAINTLINES, line 1799 of lazsyntextarea.pp $00C11847 PAINTTEXTLINES, line 1871 of lazsyntextarea.pp $00C113D8 DOPAINT, line 1489 of lazsyntextarea.pp $00C07EA0 PAINT, line 1308 of syneditmiscclasses.pp $00C0FDD2 DOPAINT, line 1134 of lazsyntextarea.pp $00C07EA0 PAINT, line 1308 of syneditmiscclasses.pp $00D9A022 DOPAINT, line 1353 of sourcesyneditor.pas $00C07EA0 PAINT, line 1308 of syneditmiscclasses.pp $0079ECCB PAINT, line 4221 of synedit.pp $005B3471 PAINTWINDOW, line 123 of include/customcontrol.inc $0059BB7B PAINTHANDLER, line 4857 of include/wincontrol.inc $005A00A4 WMPAINT, line 6851 of include/wincontrol.inc $005B3330 WMPAINT, line 103 of include/customcontrol.inc $004103A1 $0059D0A7 WNDPROC, line 5429 of include/wincontrol.inc $007A6B0F WNDPROC, line 6399 of synedit.pp FreeFormEditor: FormEditor1=TFormEditor Hint: (lazarus) [TMainIDE.Destroy] B -> inherited Destroy... TMainIDE Hint: (lazarus) [TMainIDE.Destroy] END Heap dump by heaptrc unit of i:\FPC\lazarus\lazarus.exe 6222427 memory blocks allocated : 556846869/572547168 6211889 memory blocks freed : 555436555/571105040 10538 unfreed memory blocks : 1410314 True heap size : 28114944 (128 used in System startup) True free heap : 25543392 Should be : 25661040 Call trace for block $1CEE6DD0 size 64 $00418EBF $770034A1 $77003473 $76FB0133 $00C11C76 PAINTLINES, line 1799 of lazsyntextarea.pp $00C11847 PAINTTEXTLINES, line 1871 of lazsyntextarea.pp $00C113D8 DOPAINT, line 1489 of lazsyntextarea.pp $00C07EA0 PAINT, line 1308 of syneditmiscclasses.pp $00C0FDD2 DOPAINT, line 1134 of lazsyntextarea.pp $00C07EA0 PAINT, line 1308 of syneditmiscclasses.pp $00D9A022 DOPAINT, line 1353 of sourcesyneditor.pas $00C07EA0 PAINT, line 1308 of syneditmiscclasses.pp $0079ECCB PAINT, line 4221 of synedit.pp $005B3471 PAINTWINDOW, line 123 of include/customcontrol.inc $0059BB7B PAINTHANDLER, line 4857 of include/wincontrol.inc $005A00A4 WMPAINT, line 6851 of include/wincontrol.inc Call trace for block $1C6FECD0 size 92 -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
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 #2 0x00ab95f6 in DRAWHILIGHTMARKUPTOKEN (ATOKENINFO=..., 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 diff --git a/components/synedit/lazsyntextarea.pp b/components/synedit/lazsyntextarea.pp index 4c5a599c9b..163af24e6c 100644 --- a/components/synedit/lazsyntextarea.pp +++ b/components/synedit/lazsyntextarea.pp @@ -1737,6 +1737,7 @@ procedure TLazSynTextArea.PaintTextLines(AClip: TRect; FirstLine, LastLine, if rcToken.Right > nRightEdge + 1 then tok.Bottom := rcLine.Bottom; TxtLeft := ScreenColumnToXValue(ATokenInfo.PhysicalCharStart); // because for the first token, this can be middle of a char, and lead to wrong frame +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(Length(FEtoBuf.EtoData)) ]); fTextDrawer.NewTextOut(TxtLeft, rcToken.Top, TxtFlags, tok, ATokenInfo.Tk.TokenStart, ATokenInfo.Tk.TokenLength, FEtoBuf); diff --git a/components/synedit/syntextdrawer.pp b/components/synedit/syntextdrawer.pp index 834d442563..ddbb09f4df 100644 --- a/components/synedit/syntextdrawer.pp +++ b/components/synedit/syntextdrawer.pp @@ -1267,9 +1267,14 @@ procedure TheTextDrawer.NewTextOut(X, Y: Integer; fuOptions: UINT; CharPlaceInfo.lpGlyphs:= @Glyphs[0]; CharPlaceInfo.nGlyphs:= Length(Glyphs); Glyphs[0] := #0; +debugln('BEFORE'); if GetCharacterPlacementW(FDC, PWChar(W), Length(W), 0, CharPlaceInfo, GCP_LIGATE or GCP_REORDER or GCP_GLYPHSHAPE)<> 0 then begin +debugln('GOT PLACEMENT %s / %s / %s', [dbgs(length(Glyphs)), dbgs(CharPlaceInfo.nGlyphs), dbgs(CharPlaceInfo.lpGlyphs=@Glyphs[0]) ]); +if CharPlaceInfo.nGlyphs > 0 then begin +debugln('GOT --- %s / %s', [dbgs(length(Glyphs)), dbgMemRange(CharPlaceInfo.lpGlyphs, 2*CharPlaceInfo.nGlyphs)]); Windows.ExtTextOutW(FDC, X, Y, fuOptions or ETO_GLYPH_INDEX, @ARect, Pointer(Glyphs), CharPlaceInfo.nGlyphs, EtoArray); exit; +end; end; end; {$ENDIF} -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
06.10.2020 13:32, Martin Frb via lazarus пишет: > On 06/10/2020 01:01, Maxim Ganetsky via lazarus wrote: >> 05.10.2020 18:36, Martin Frb via lazarus пишет: >>> On 05/10/2020 00:27, Maxim Ganetsky via lazarus wrote: Lazarus hangs on start for me on Windows 7 when compiled with this define. Lazarus 2.1.0 r63957 FPC 3.2.0 i386-win32-win32/win64. I use JetBrains Mono font. >>> >>> The other ...TextOut in the lines below that should be kept as they are. >> >> This change does not help. > > Ok, I installed Win7 in a virtualbox, got Lazarus, installed the > "JetBrains mono" font (just the regular, skipped all the > light/italics) and "JetBrains mono Variable". > > No crash. > Ligatures work (well the subset as described in other mail) > > Without any way of reproducing, there isn't much I can do. > > > Can you try to catch it in the debugger, and see what params are given > to NewTextOut > in > #2 0x00ab95f6 in DRAWHILIGHTMARKUPTOKEN (ATOKENINFO=..., > 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. -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
On 06/10/2020 01:01, Maxim Ganetsky via lazarus wrote: 05.10.2020 18:36, Martin Frb via lazarus пишет: On 05/10/2020 00:27, Maxim Ganetsky via lazarus wrote: Lazarus hangs on start for me on Windows 7 when compiled with this define. Lazarus 2.1.0 r63957 FPC 3.2.0 i386-win32-win32/win64. I use JetBrains Mono font. The other ...TextOut in the lines below that should be kept as they are. This change does not help. Ok, I installed Win7 in a virtualbox, got Lazarus, installed the "JetBrains mono" font (just the regular, skipped all the light/italics) and "JetBrains mono Variable". No crash. Ligatures work (well the subset as described in other mail) Without any way of reproducing, there isn't much I can do. Can you try to catch it in the debugger, and see what params are given to NewTextOut in #2 0x00ab95f6 in DRAWHILIGHTMARKUPTOKEN (ATOKENINFO=..., parentfp=0x13abf6e8) at lazsyntextarea.pp:1741 fTextDrawer.NewTextOut(TxtLeft, rcToken.Top, TxtFlags, tok, ATokenInfo.Tk.TokenStart, ATokenInfo.Tk.TokenLength, FEtoBuf); -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
05.10.2020 18:36, Martin Frb via lazarus пишет: On 05/10/2020 00:27, Maxim Ganetsky via lazarus wrote: Lazarus hangs on start for me on Windows 7 when compiled with this define. Lazarus 2.1.0 r63957 FPC 3.2.0 i386-win32-win32/win64. I use JetBrains Mono font. I installed the font myself. And it works on windows 10 and that works. However I found one possible issue. Please go to SynTextDrawer.pp line 1269 and replace the current Windows.ExtTextOutW(FDC, X, Y, fuOptions or ETO_GLYPH_INDEX, @ARect, Pointer(Glyphs), Length(Glyphs), EtoArray); with the following new Windows.ExtTextOutW(FDC, X, Y, fuOptions or ETO_GLYPH_INDEX, @ARect, Pointer(Glyphs), CharPlaceInfo.nGlyphs, EtoArray); The other ...TextOut in the lines below that should be kept as they are. This change does not help. I also tried your suggestion to make function TheFontStock.GetNeedETO to always return false. This did not make any difference too. -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]
On 05/10/2020 00:27, Maxim Ganetsky via lazarus wrote: Lazarus hangs on start for me on Windows 7 when compiled with this define. Lazarus 2.1.0 r63957 FPC 3.2.0 i386-win32-win32/win64. I use JetBrains Mono font. I installed the font myself. And it works on windows 10 and that works. However I found one possible issue. Please go to SynTextDrawer.pp line 1269 and replace the current Windows.ExtTextOutW(FDC, X, Y, fuOptions or ETO_GLYPH_INDEX, @ARect, Pointer(Glyphs), Length(Glyphs), EtoArray); with the following new Windows.ExtTextOutW(FDC, X, Y, fuOptions or ETO_GLYPH_INDEX, @ARect, Pointer(Glyphs), CharPlaceInfo.nGlyphs, EtoArray); The other ...TextOut in the lines below that should be kept as they are. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus