Sign in Join

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

Mailing lists / lazarus / 2014-08

font.name=default

12 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Philippe

I wrote a program, used font.name=default for allmost everything ... it was looking as Arial font. Fine.

It was on a Windows 8 machine.

Then I copied the program to a Windows XP machine to check.

Where
static text and others are written with something looking as a New Times Roman ...
and sometimes not fitting in the field width ... and be splitted!

I undestood there is something about windows default font. Googled ... ... ...

On the my W8 machine default font (from registers) are Microsoft Sans Serif and Tahoma ... diferent.

I made a test. In
the attached image, the first text is with default, the second with Arial, both with bold mode. Arial was the closest font from default I found ... but still a bit diferent.

Question 1): which default font is
used with Lazarus ?

Question 2): is there a way I can set the default
font in Lazarus?

Thank for your help

Philippe

PS. F1 in font.name
... error 404.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140816/3efbae8f/attachment.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: default font test.png
Type: application/octet-stream
Size: 5944 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140816/3efbae8f/attachment.obj>

Reply by email

Salvatore Coppola
to Philippe

2014-08-16 12:40 GMT+02:00 Philippe :

Show quoted text 23 lines
I wrote a program, used font.name=default for allmost everything ... it was looking as Arial font. Fine. It was on a Windows 8 machine. Then I copied the program to a Windows XP machine to check. Where static text and others are written with something looking as a New Times Roman ... and sometimes not fitting in the field width ... and be splitted! I undestood there is something about windows default font. Googled ... ... ... On the my W8 machine default font (from registers) are Microsoft Sans Serif and Tahoma ... diferent. I made a test. In the attached image, the first text is with default, the second with Arial, both with bold mode. Arial was the closest font from default I found ... but still a bit diferent. Question 1): which default font is used with Lazarus ?

the theme fonts

Question 2): is there a way I can set the default font in Lazarus?

I don't know if is possible in RAD way, but you can set the font you want in on create event for each controls you want.

procedure TForm1.FormCreate(Sender: TObject);
var i: integer;
begin
    for i:=0 to ControlCount-1 do
      Controls[i].Font:=YOURFONT;
end;
Show quoted text 13 lines
Thank for your help Philippe PS. F1 in font.name ... error 404. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140820/efc92684/attachment.html>

Reply by email

Philippe
to Salvatore Coppola

thank for your answer.

I found the default font on my
machine/windows 8 is Segoe UI. I?ll check if it is avalaible under other version of Windows ...

your suggestion (looping controls) is
interesting, I didn?t know it, but will change all the controls of the form ... and that is not what I need ... I just want to change the Lazarus default. So it will change the font of controls using font.name='Default' in the configuration/object inspector.

Philippe

Salvatore Coppola wrote
2014-08-16 12:40

GMT+02:00 Philippe :

> I wrote a program,

used font.name [1]=default for allmost everything ... it was looking as Arial font. Fine.

> > It was on a Windows 8 machine. > > Then I

copied the program to a Windows XP machine to check.

> > Where

static text and others are written with something looking as a New Times Roman ...

> and sometimes not fitting in the field width ... and be

splitted!

> > I undestood there is something about windows default

font. Googled ... ... ...

> > On the my W8 machine default font

(from registers) are Microsoft Sans Serif and Tahoma ... diferent.

> > I made a test. In the attached image, the first text is with

default, the second with Arial, both with bold mode. Arial was the closest font from default I found ... but still a bit diferent.

> >

Question 1): which default font is used with Lazarus ?

the theme

fonts

> Question 2): is there a way I can set the default font in

Lazarus?

I don't know if is possible in RAD way, but you can set

the font you want in on create event for each controls you want.

procedure TForm1.FormCreate(Sender: TObject);
var i: integer;
begin
for i:=0 to ControlCount-1 do Controls[i].Font:=YOURFONT;
end;
Show quoted text 6 lines
Thank for your help Philippe PS. F1 in

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]

Links:
------
[1] http://font.name
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]
http://webmail.quarta.com.br/<div>

&gt;&nbsp;lto:&quot;&gt;
&gt;&nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus&nbsp;[2] &gt;&nbsp;
&gt;&nbsp;--&nbsp;_______________________________________________&nbsp;Lazarus&nbsp;mailing&nbsp;list&nbsp; </div>epascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140820/7448e55b/attachment-0001.html>

Reply by email

Philippe
to Philippe

"default" for font.name does not sound very clear for me. I thought it was a Lazarus default.

may be a suggestion: using "OS default" ...

and it should be nice to be able to use a "Lazarus default" which could be configurated ...

especialy when developing for a unique OS
...

Philippe

Philippe wrote
thank for

your answer.

I found the default font on my machine/windows 8 is

Segoe UI. I?ll check if it is avalaible under other version of Windows ...

your suggestion (looping controls) is interesting, I didn?t

know it, but will change all the controls of the form ... and that is not what I need ... I just want to change the Lazarus default. So it will change the font of controls using font.name='Default' in the configuration/object inspector.

Philippe Em 20.08.2014
Salvatore Coppola wrote
> 2014-08-16 12:40 GMT+02:00

Philippe :

> >> I wrote a program, used

font.name [1]=default for allmost everything ... it was looking as Arial font. Fine.

>> >> It was on a Windows 8 machine. >> >> Then I

copied the program to a Windows XP machine to check.

>> >> Where

static text and others are written with something looking as a New Times Roman ...

>> and sometimes not fitting in the field width ... and be

splitted!

>> >> I undestood there is something about windows default

font. Googled ... ... ...

>> >> On the my W8 machine default font

(from registers) are Microsoft Sans Serif and Tahoma ... diferent.

>> >> I made a test. In the attached image, the first text is with

default, the second with Arial, both with bold mode. Arial was the closest font from default I found ... but still a bit diferent.

Show quoted text 5 lines
>> >> Question 1): which default font is used with Lazarus ? > > the

theme fonts

> >> Question 2): is there a way I can set the default

font in Lazarus?

> > I don't know if is possible in RAD way, but you

can set the font you want in on create event for each controls you want.

> > procedure TForm1.FormCreate(Sender: TObject); > var i:
integer;
> begin > for i:=0 to ControlCount-1 do >
Controls[i].Font:=YOURFONT;
Show quoted text 5 lines
> end; > > Thank for your help > >

Philippe

> > PS. F1 in

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]

> _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2] Links: ------ [1] http://font.name [2] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3] http://webmail.quarta.com.br/<div> &gt;&nbsp;:&quot;&gt; &gt;&nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus&nbsp;[2] &gt;&nbsp; &gt;&nbsp;--&nbsp;_______________________________________________&nbsp;Lazarus&nbsp;mailing&nbsp;list&nbsp; </div>scal.org/mailman/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140820/708220b2/attachment.html>

Reply by email

Philippe
to Philippe: thank for your answer. I found the default font on my machine/windows 8 is Segoe UI. I?ll…

I wrote about a suggestion ... a Lazarus default font ...

may be,
as far as I understand, using "Parent Font" property is the way ... I?ll try it!

Philippe

Philippe wrote
thank

for your answer.

I found the default font on my machine/windows 8

is Segoe UI. I?ll check if it is avalaible under other version of Windows ...

your suggestion (looping controls) is interesting, I

didn?t know it, but will change all the controls of the form ... and that is not what I need ... I just want to change the Lazarus default. So it will change the font of controls using font.name='Default' in the configuration/object inspector.

Philippe Em 20.08.2014
Salvatore Coppola wrote
> 2014-08-16 12:40 GMT+02:00

Philippe :

> >> I wrote a program, used

font.name [1]=default for allmost everything ... it was looking as Arial font. Fine.

>> >> It was on a Windows 8 machine. >> >> Then I

copied the program to a Windows XP machine to check.

>> >> Where

static text and others are written with something looking as a New Times Roman ...

>> and sometimes not fitting in the field width ... and be

splitted!

>> >> I undestood there is something about windows default

font. Googled ... ... ...

>> >> On the my W8 machine default font

(from registers) are Microsoft Sans Serif and Tahoma ... diferent.

>> >> I made a test. In the attached image, the first text is with

default, the second with Arial, both with bold mode. Arial was the closest font from default I found ... but still a bit diferent.

Show quoted text 5 lines
>> >> Question 1): which default font is used with Lazarus ? > > the

theme fonts

> >> Question 2): is there a way I can set the default

font in Lazarus?

> > I don't know if is possible in RAD way, but you

can set the font you want in on create event for each controls you want.

> > procedure TForm1.FormCreate(Sender: TObject); > var i:
integer;
> begin > for i:=0 to ControlCount-1 do >
Controls[i].Font:=YOURFONT;
Show quoted text 5 lines
> end; > > Thank for your help > >

Philippe

> > PS. F1 in

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]

> _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2] Links: ------ [1] http://font.name [2] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3] http://webmail.quarta.com.br/<div> &gt;&nbsp;:&quot;&gt; &gt;&nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus&nbsp;[2] &gt;&nbsp; &gt;&nbsp;--&nbsp;_______________________________________________&nbsp;Lazarus&nbsp;mailing&nbsp;list&nbsp; </div>scal.org/mailman/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140821/49af16ab/attachment.html>

Reply by email

Salvatore Coppola
to Philippe

You can choose the controls you want this way

var i: integer;
begin
  for i:=0 to ControlCount-1 do
    if Controls[i] is TButton then
      ShowMessage(Controls[i].Name);
end;
Ciao

2014-08-21 13:09 GMT+02:00 Philippe :

Show quoted text 101 lines
I wrote about a suggestion ... a Lazarus default font ... may be, as far as I understand, using "Parent Font" property is the way ... I?ll try it! Philippe Em 20.08.2014 19:54, Philippe escreveu: thank for your answer. I found the default font on my machine/windows 8 is Segoe UI. I?ll check if it is avalaible under other version of Windows ... your suggestion (looping controls) is interesting, I didn?t know it, but will change all the controls of the form ... and that is not what I need ... I just want to change the Lazarus default. So it will change the font of controls using font.name='Default' in the configuration/object inspector. Philippe Em 20.08.2014 12:58, Salvatore Coppola escreveu: 2014-08-16 12:40 GMT+02:00 Philippe : > I wrote a program, used font.name=default for allmost everything ... it > was looking as Arial font. Fine. > > It was on a Windows 8 machine. > > Then I copied the program to a Windows XP machine to check. > > Where static text and others are written with something looking as a New > Times Roman ... > and sometimes not fitting in the field width ... and be splitted! > > I undestood there is something about windows default font. Googled ... > ... ... > > On the my W8 machine default font (from registers) are Microsoft Sans > Serif and Tahoma ... diferent. > > I made a test. In the attached image, the first text is with default, the > second with Arial, both with bold mode. Arial was the closest font from > default I found ... but still a bit diferent. > > Question 1): which default font is used with Lazarus ? > the theme fonts > Question 2): is there a way I can set the default font in Lazarus? > I don't know if is possible in RAD way, but you can set the font you want in on create event for each controls you want. procedure TForm1.FormCreate(Sender: TObject); var i: integer; begin for i:=0 to ControlCount-1 do Controls[i].Font:=YOURFONT; end; > Thank for your help > > Philippe > > PS. F1 in font.name ... error 404. > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- _______________________________________________ Lazarus mailing ://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing ://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140822/aef4095c/attachment.html>

Reply by email

Philippe
to Salvatore Coppola

nice. it may help some day!

I already made the changes using
"parent font" and so one ... a bit work! ... but it is done and it has been usefull to check a all the user?s interface !!!

thanks

Philippe

Salvatore Coppola wrote
You can choose

the controls you want this way

var i: integer; begin for
i:=0 to ControlCount-1 do
if Controls[i] is TButton then
ShowMessage(Controls[i].Name);
end; Ciao 2014-08-21 13:09

GMT+02:00 Philippe :

> I wrote about a

suggestion ... a Lazarus default font ...

> > may be, as far as I

understand, using "Parent Font" property is the way ... I?ll try it!

Show quoted text 7 lines
> > Philippe > > Em 20.08.2014 19:54, Philippe escreveu: > >>

thank for your answer.

>> >> I found the default font on my

machine/windows 8 is Segoe UI. I?ll check if it is avalaible under other version of Windows ...

>> >> your suggestion (looping controls) is

interesting, I didn?t know it, but will change all the controls of the form ... and that is not what I need ... I just want to change the Lazarus default. So it will change the font of controls using font.name [1]='Default' in the configuration/object inspector.

Show quoted text 7 lines
>> >> Philippe >> >> Em 20.08.2014 12:58, Salvatore Coppola escreveu: >> >>>

2014-08-16 12:40 GMT+02:00 Philippe :

>>> >>>> I wrote a program, used font.name [1]=default for allmost

everything ... it was looking as Arial font. Fine.

>>>> >>>> It was

on a Windows 8 machine.

>>>> >>>> Then I copied the program to a

Windows XP machine to check.

>>>> >>>> Where static text and others

are written with something looking as a New Times Roman ...

>>>> and

sometimes not fitting in the field width ... and be splitted!

>>>> >>>> I undestood there is something about windows default font.

Googled ... ... ...

>>>> >>>> On the my W8 machine default font

(from registers) are Microsoft Sans Serif and Tahoma ... diferent.

>>>> >>>> I made a test. In the attached image, the first text is

with default, the second with Arial, both with bold mode. Arial was the closest font from default I found ... but still a bit diferent.

Show quoted text 5 lines
>>>> >>>> Question 1): which default font is used with Lazarus ? >>> >>>

the theme fonts

>>> >>>> Question 2): is there a way I can set the

default font in Lazarus?

>>> >>> I don't know if is possible in RAD

way, but you can set the font you want in on create event for each controls you want.

>>> >>> procedure TForm1.FormCreate(Sender:
TObject);
>>> var i: integer; >>> begin >>> for i:=0 to

ControlCount-1 do

Show quoted text 9 lines
>>> Controls[i].Font:=YOURFONT; >>> end; >>> >>> Thank for your help >>> >>> Philippe >>> >>> PS. F1 in

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]

Show quoted text 5 lines
>> >> -- >> _______________________________________________ >> Lazarus

mailing list

>> >>

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]

> >
>> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2] > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2] Links: ------ [1] http://font.name [2] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3] http://webmail.quarta.com.br/<div> &gt;&nbsp;lto:&quot;&gt; &gt;&nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus&nbsp;[2] &gt;&nbsp; &gt;&nbsp;--&nbsp;_______________________________________________&nbsp;Lazarus&nbsp;mailing&nbsp;list&nbsp; </div>epascal.org/mailman/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140822/c448c002/attachment-0001.html>

Reply by email

Philippe
to Salvatore Coppola: You can choose the controls you want this way var i: integer; begin for i:=0 to…

just for information ...

I tried to use your suggestion ... it
works ... but ... I am using TGroupBox in TGroupBox in TGroupBox ...

your example just loops on the top level controls of the form ... needing to use recursive function to go through contained group boxes ... what I?ll do later.

Philippe

Salvatore Coppola wrote 7 lines
You can choose the controls you want this way var i: integer; begin for i:=0 to ControlCount-1 do if

Controls[i] is TButton then

ShowMessage(Controls[i].Name); end;

Ciao

2014-08-21 13:09 GMT+02:00 Philippe

:

> I wrote about a suggestion ... a Lazarus

default font ...

> > may be, as far as I understand, using "Parent

Font" property is the way ... I?ll try it!

> > Philippe > > Em
Philippe wrote 5 lines
> >> thank for your answer. >> >> I found the default font on my machine/windows 8 is Segoe UI.

I?ll check if it is avalaible under other version of Windows ...

>> >> your suggestion (looping controls) is interesting, I didn?t know

it, but will change all the controls of the form ... and that is not what I need ... I just want to change the Lazarus default. So it will change the font of controls using font.name [1]='Default' in the configuration/object inspector.

>> >> Philippe >> >> Em
Salvatore Coppola wrote
>> >>> 2014-08-16

12:40 GMT+02:00 Philippe :

>>> >>>> I wrote a

program, used font.name [1]=default for allmost everything ... it was looking as Arial font. Fine.

>>>> >>>> It was on a Windows 8

machine.

>>>> >>>> Then I copied the program to a Windows XP machine

to check.

>>>> >>>> Where static text and others are written with

something looking as a New Times Roman ...

>>>> and sometimes not

fitting in the field width ... and be splitted!

>>>> >>>> I

undestood there is something about windows default font. Googled ... ... ...

>>>> >>>> On the my W8 machine default font (from registers) are

Microsoft Sans Serif and Tahoma ... diferent.

>>>> >>>> I made a

test. In the attached image, the first text is with default, the second with Arial, both with bold mode. Arial was the closest font from default I found ... but still a bit diferent.

>>>> >>>> Question 1): which

default font is used with Lazarus ?

Show quoted text 5 lines
>>> >>> the theme fonts >>> >>>> Question 2): is there a way I can set the default font in

Lazarus?

>>> >>> I don't know if is possible in RAD way, but you can

set the font you want in on create event for each controls you want.

>>> >>> procedure TForm1.FormCreate(Sender: TObject); >>> var i:
integer;
>>> begin >>> for i:=0 to ControlCount-1 do >>>
Controls[i].Font:=YOURFONT;
Show quoted text 8 lines
>>> end; >>> >>> Thank for your help >>> >>> Philippe >>> >>> PS. F1 in

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]

Show quoted text 5 lines
>> >> -- >> _______________________________________________ >> Lazarus

mailing list

>> >>

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]

> >
>> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2] > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2] Links: ------ [1] http://font.name [2] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3] http://webmail.quarta.com.br/<div> &gt;&nbsp;lto:&quot;&gt; &gt;&nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus&nbsp;[2] &gt;&nbsp; &gt;&nbsp;--&nbsp;_______________________________________________&nbsp;Lazarus&nbsp;mailing&nbsp;list&nbsp; </div>epascal.org/mailman/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140824/f1339a83/attachment-0001.html>

Reply by email

Hans-Peter Diettrich
to Philippe
Show quoted text 8 lines
just for information ... I tried to use your suggestion ... it works ... but ... I am using TGroupBox in TGroupBox in TGroupBox ... your example just loops on the top level controls of the form ... needing to use recursive function to go through contained group boxes ... what I?ll do later.

Then use Components[] instead of Controls[].

DoDi

Reply by email

Philippe
to Hans-Peter Diettrich

nice. I?ll try it.

(my recursive procedure worked well, not a big
deal!).

I had some difficulty to find informations about controls, components ... if you about them you can find the reference ... but it does not help much! ... any hint?

P.

Hans-Peter Diettrich wrote
Philippe schrieb: > just for information ...

I tried to use your suggestion ... it works ... but ... I am using TGroupBox in TGroupBox in TGroupBox ... your example just loops on the top level controls of the form ... needing to use recursive function to go through contained group boxes ... what I?ll do later.

Then use

Components[] instead of Controls[].

Show quoted text 5 lines
DoDi --

Reply by email

Hans-Peter Diettrich
to Philippe
nice. I?ll try it. (my recursive procedure worked well, not a big deal!).

That's what I use, too, sometimes :-)

I had some difficulty to find informations about controls, components ... if you about them you can find the reference ... but it does not help much! ... any hint?

I only know from Delphi that obj.Components contains all components owned by obj, while obj.Controls contains the child controls of obj, whose Parent is obj. A TForm typically owns all its contained components (flat view), while nested (visual) controls reside in their Parent TWinControl (tree view).

DoDi

Reply by email

Philippe
to Hans-Peter Diettrich

thank you for these informations ... it helps!

Philippe

Em

Hans-Peter Diettrich wrote
Philippe schrieb: > nice. I?ll try it. (my recursive procedure worked well, not a big

deal!).

That's what I use, too, sometimes :-) > I had some

difficulty to find informations about controls, components ... if you about them you can find the reference ... but it does not help much! ... any hint?

I only know from Delphi that obj.Components contains all

components

owned by obj, while obj.Controls contains the child

controls of obj,

whose Parent is obj. A TForm typically owns all its

contained components

(flat view), while nested (visual) controls

reside in their Parent

Show quoted text 6 lines
TWinControl (tree view). DoDi --

Reply by email