Re: [Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]

2020-10-05 Thread Maxim Ganetsky via lazarus

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


Re: [Lazarus] -dWINDOWS_LIGATURE [[Re: Font ligatures support]]

2020-10-05 Thread Martin Frb via lazarus

On 05/10/2020 22:46, Sven Barth via lazarus wrote:
I've tested it (with Cascadia Code) and while it shows the one or 
other ligature, Visual Studio shows more.


Take the following sequence:

-> => >= <= *** .. ... <> >< >> << >>> <<< == !=


I found that if I put them into a string or comment, then they do all 
ligate

Equally if I switch off the Highlighter

Maybe the HL's tokenizer.
Could be the HL sees a - as one token, and has that printed individually.

So those tokens either need to be kept together (But pascal dictates the 
"-" as one token), or joined together again.

=> is one Pascal token
-> is not. The HL sees 2 tokens (never mind they make no sense in that 
order)


Currently also ligatures do get broken, if you extend the selection, and 
have half of it selected.
That requires a rewrite of some parts of the painting code (needs to get 
into my TODO queue...)

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] -dWINDOWS_LIGATURE [[Re: Font ligatures support]]

2020-10-05 Thread Sven Barth via lazarus

Am 04.10.2020 um 18:05 schrieb Martin Frb via lazarus:

On 04/10/2020 10:14, Mr Bee wrote:
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.



revision 63951

Windows only, compile with -dWINDOWS_LIGATURE
Tested with Cascadia.

If someone wants to add an option "show ligatures" ($IFDEF WINDOWS} to 
the IDE options (Editor > Display / like the anti aliasing option), 
then the feature can depend on that, and no longer needs the define.


I've tested it (with Cascadia Code) and while it shows the one or other 
ligature, Visual Studio shows more.


Take the following sequence:

-> => >= <= *** .. ... <> >< >> << >>> <<< == !=

Visual Studio shows all as ligatures except the first one and the 
symmetric difference (I think it doesn't have one)


Lazarus however only shows >=, <=, <>  and .. as ligatures and for the 
three points it displays them as ".. .", so the first two are presented 
by their ligature, but the third dot is done separately (unlike in 
Visual Studio).


Regards,
Sven
-- 
___
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]]

2020-10-05 Thread 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.
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to start Lazarus on Mac ?

2020-10-05 Thread Karl-Michael Schindler via lazarus
Hi

> Am 05.10.2020 um 07:56 schrieb lazarus-requ...@lists.lazarus-ide.org:
> 
> Date: Sun, 4 Oct 2020 22:21:06 +0200 (CEST)
> From: Michael Van Canneyt 
> To: Mattias Gaertner via lazarus 
> Subject: Re: [Lazarus] How to start Lazarus on Mac ?
> Message-ID: 
> Content-Type: text/plain; charset=US-ASCII; format=flowed
> 
> On Sun, 4 Oct 2020, Mattias Gaertner via lazarus wrote:
> 
>> On Sun, 4 Oct 2020 15:52:27 +0200 (CEST)
>> Michael Van Canneyt via lazarus  wrote:
>> 
>>> [...]
>>> Should not the system installed version  detect the 'local' version
>>> and start that ?
>> 
>> Sounds like:
>> https://bugs.freepascal.org/view.php?id=37753
> 
> I think the correct solution is indeed to let the installed "Lazarus.app" 
> start
> the startlazarus binary. That will then take care of the rest.
> 
> Any idea how I can accomplish this myself ? 
> I tried setting the symbolic link 'lazarus' in 
> /Application/Lazarus.app/Contents/MacOS 
> to ../../../startlazarus, but that does not seem to be enough.
> 
> I get strange effects, that's the least I can say :-)
> 
> Michael.

Has anyone checked whether using /opt instead of /usr/local resolves the issue? 
At least this is the sort of resolution of the package managers fink and 
macports.

Michael.
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus