Sign in Join

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

Mailing lists / lazarus / 2003-08

SystemFont in TTextStyle

8 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Micha Nelissen
to Micha Nelissen: 1) In propedits.pp, TPropertyEditor.PropDrawName, SystemFont is not initialized. In all…
Mattias Gaertner wrote 25 lines
On Tue, 26 Aug 2003 18:53:30 +0200 Micha Nelissen wrote: >Mattias Gaertner wrote: > > >>On Tue, 26 Aug 2003 17:50:49 +0200 >>Micha Nelissen wrote: >> >>>2) The system font is really ugly on win32. Should the interface >>>substitute a nicer font or should the lcl only specify system font for >>>fatal errors? >> >> >>The LCL should use as default font the same font as all other apps on >>the desktop. > >Okay, but what is the difference between setting TextStyle.SystemFont >and specifying FontName = 'default' ? The Font Name is only one TFont property. TextStyle.SystemFont specifies the name, size, pitch, charset. And maybe more in future.

Hmm, as far as I can see, the GTK checks if the name is 'default', and if so, loads a default font, with default size and everything.

Regards,

Micha.

Reply by email

Mattias Gaertner
to Micha Nelissen: 1) In propedits.pp, TPropertyEditor.PropDrawName, SystemFont is not initialized. In all…
Show quoted text 31 lines
Mattias Gaertner wrote: > On Tue, 26 Aug 2003 18:53:30 +0200 > Micha Nelissen wrote: > > >>Mattias Gaertner wrote: >> >> >>>On Tue, 26 Aug 2003 17:50:49 +0200 >>>Micha Nelissen wrote: >>> >>>>2) The system font is really ugly on win32. Should the interface >>>>substitute a nicer font or should the lcl only specify system font for > >>>>fatal errors? >>> >>> >>>The LCL should use as default font the same font as all other apps on >>>the desktop. >> >>Okay, but what is the difference between setting TextStyle.SystemFont >>and specifying FontName = 'default' ? > > > The Font Name is only one TFont property. > TextStyle.SystemFont specifies the name, size, pitch, charset. And maybe > more in future. Hmm, as far as I can see, the GTK checks if the name is 'default', and if so, loads a default font, with default size and everything.

Yep. The font implementation is not complete in the gtk intf.

Mattias

Reply by email

Micha Nelissen

Hi,

1) In propedits.pp, TPropertyEditor.PropDrawName, SystemFont is not initialized. In all TTextStyle initializations, ExpandTabs is not initialized.
2) The system font is really ugly on win32. Should the interface substitute a nicer font or should the lcl only specify system font for fatal errors?

Regards,

Micha.

Reply by email

Mattias Gaertner
to Micha Nelissen
Hi, 1) In propedits.pp, TPropertyEditor.PropDrawName, SystemFont is not initialized.

Fixed

In all TTextStyle initializations, ExpandTabs is not initialized.

It is set to false. Is this the correct value?

2) The system font is really ugly on win32. Should the interface substitute a nicer font or should the lcl only specify system font for fatal errors?

The LCL should use as default font the same font as all other apps on the desktop.

Mattias

Reply by email

Micha Nelissen
to Micha Nelissen: 1) In propedits.pp, TPropertyEditor.PropDrawName, SystemFont is not initialized. In all…
Mattias Gaertner wrote 9 lines
On Tue, 26 Aug 2003 17:50:49 +0200 Micha Nelissen wrote: >In all TTextStyle initializations, ExpandTabs is not >initialized. It is set to false. Is this the correct value?

I think so...the object inspector doesn't use tabs.

Show quoted text 8 lines
>2) The system font is really ugly on win32. Should the interface >substitute a nicer font or should the lcl only specify system font for >fatal errors? The LCL should use as default font the same font as all other apps on the desktop.

Okay, but what is the difference between setting TextStyle.SystemFont and specifying FontName = 'default' ?

Regards,

Micha.

Reply by email

Mattias Gaertner
to Micha Nelissen: 1) In propedits.pp, TPropertyEditor.PropDrawName, SystemFont is not initialized. In all…
Show quoted text 47 lines
Mattias Gaertner wrote: > On Tue, 26 Aug 2003 19:13:23 +0200 > Micha Nelissen wrote: > > >>Mattias Gaertner wrote: >> >> >>>On Tue, 26 Aug 2003 18:53:30 +0200 >>>Micha Nelissen wrote: >>> >>> >>> >>>>Mattias Gaertner wrote: >>>> >>>> >>>> >>>>>On Tue, 26 Aug 2003 17:50:49 +0200 >>>>>Micha Nelissen wrote: >>>>> >>>>> >>>>>>2) The system font is really ugly on win32. Should the interface >>>>>>substitute a nicer font or should the lcl only specify system font >for>> >>>>>>fatal errors? >>>>> >>>>> >>>>>The LCL should use as default font the same font as all other apps on >>>>>the desktop. >>>> >>>>Okay, but what is the difference between setting TextStyle.SystemFont >>>>and specifying FontName = 'default' ? >>> >>> >>>The Font Name is only one TFont property. >>>TextStyle.SystemFont specifies the name, size, pitch, charset. And >maybe>>more in future. >> >>Hmm, as far as I can see, the GTK checks if the name is 'default', and >>if so, loads a default font, with default size and everything. > > > Yep. The font implementation is not complete in the gtk intf. Okay, let's implement it correctly then. What to do if size = 0 (which is the case for DefFontData) ?

Good question. Have to look, what Delphi does.

Mattias

Reply by email

Mattias Gaertner
to Micha Nelissen: 1) In propedits.pp, TPropertyEditor.PropDrawName, SystemFont is not initialized. In all…
Show quoted text 25 lines
Mattias Gaertner wrote: > On Tue, 26 Aug 2003 17:50:49 +0200 > Micha Nelissen wrote: > > >>In all TTextStyle initializations, ExpandTabs is not >>initialized. > > > It is set to false. Is this the correct value? I think so...the object inspector doesn't use tabs. > >>2) The system font is really ugly on win32. Should the interface >>substitute a nicer font or should the lcl only specify system font for >>fatal errors? > > > The LCL should use as default font the same font as all other apps on > the desktop. Okay, but what is the difference between setting TextStyle.SystemFont and specifying FontName = 'default' ?

The Font Name is only one TFont property.
TextStyle.SystemFont specifies the name, size, pitch, charset. And maybe more in future.

Mattias

Reply by email

Micha Nelissen
to Micha Nelissen: 1) In propedits.pp, TPropertyEditor.PropDrawName, SystemFont is not initialized. In all…
Mattias Gaertner wrote 42 lines
On Tue, 26 Aug 2003 19:13:23 +0200 Micha Nelissen wrote: >Mattias Gaertner wrote: > > >>On Tue, 26 Aug 2003 18:53:30 +0200 >>Micha Nelissen wrote: >> >> >> >>>Mattias Gaertner wrote: >>> >>> >>> >>>>On Tue, 26 Aug 2003 17:50:49 +0200 >>>>Micha Nelissen wrote: >>>> >>>> >>>>>2) The system font is really ugly on win32. Should the interface >>>>>substitute a nicer font or should the lcl only specify system font for >> >>>>>fatal errors? >>>> >>>> >>>>The LCL should use as default font the same font as all other apps on >>>>the desktop. >>> >>>Okay, but what is the difference between setting TextStyle.SystemFont >>>and specifying FontName = 'default' ? >> >> >>The Font Name is only one TFont property. >>TextStyle.SystemFont specifies the name, size, pitch, charset. And maybe >>more in future. > >Hmm, as far as I can see, the GTK checks if the name is 'default', and >if so, loads a default font, with default size and everything. Yep. The font implementation is not complete in the gtk intf.

Okay, let's implement it correctly then. What to do if size = 0 (which is the case for DefFontData) ?

Regards,

Micha.

Reply by email