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]]
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]]
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 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]]
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]]
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