Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-02

Check for 'default' font

7 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexey

I find all places of 'default' in Laz-

Here you see all variants... :( Pls, make one variant. SameText(..., 'default') is best.

if AnsiCompare(.., 'default')=0 then
if SameText(.., 'default') then
if CompareText(... 'default')=0 then
if CompareText(... 'default')0 then
if ....='default' then
Regards, Alexey

Reply by email

Alexey
to Alexey
Alexey wrote 9 lines
if AnsiCompare(.., 'default')=0 then if SameText(.., 'default') then if CompareText(... 'default')=0 then if CompareText(... 'default')0 then if ....='default' then

@devs
Can i make the pch, which adds IsFontNameDefault, and all places use this func?

Regards, Alexey

Reply by email

Mattias Gaertner
to Alexey
Show quoted text 7 lines
On 20.02.2017 04:23, Mattias Gaertner via Lazarus wrote: > Why is SameText best? > > Mattias Because it's working in all cases (for ansistring it's ok, for Unicode font names it will work too, yes?) and it's short

'default' is the same in all encodings. It does not matter if you use SameText, CompareText or AnsiCompareText. Btw, SameText uses CompareText.

Mattias

Reply by email

Alexey
to Mattias Gaertner
Mattias Gaertner wrote
It does not matter if you use SameText, CompareText or AnsiCompareText. Btw, SameText uses CompareText.

yes, it is right, I want to make diff, which uses SameText in all places, in IDE...

Regards, Alexey

Reply by email

Mattias Gaertner
to Alexey
Show quoted text 7 lines
On 21.02.2017 00:14, Mattias Gaertner via Lazarus wrote: > It does not matter if you use > SameText, CompareText or AnsiCompareText. Btw, SameText uses > CompareText. yes, it is right, I want to make diff, which uses SameText in all places, in IDE...

As I wrote, SameText is merely a slightly slower version of CompareText.
What are you up to?

Mattias

Reply by email