[lazarus] is there a font problem?

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jun 9 15:10:46 EDT 2003


On Mon, 9 Jun 2003 16:57:57 +0200
"Stefan Weber" <weber at freestyling.de> wrote:

> Tony Maro wrote:
> 
> > What I found is that all fonts by default try to go with the user's GTK
> > theme, but if you try to programmatically change a font, they don't
> > change.
> 
> That's what I experienced and why I thought there was an error.
>
> [...] 
> Well I don't know much about GTK and even less about Gnome. As a Delphi
> programmer I was confused by the fact that changing the TLabel.Font in
> the Object Inspector doesn't do anything.
> 
> I understand that it is sensible to default to the theme font, but it
> should be possible to override it or some of its properties while keeping
> the others, e.g. if I need a bold label.
> 
> Anyhow I find it misleading that a font selected in the object inspector
> is stored inside the Name property in the .lfm but has no effect.
> 
> Maybe this could be accomplished through a new property similar to the
> ParentFont property e.g. "DefaultFont". If set to true no properties
> would get streamed to the .lfm and the properties would be locked
> to the default values.

They are visible in the OI, because they can be streamed. This makes porting
Delphi code easier.
Of course it is unpleasant, showing values, that are not yet implemented. I
think, we need this 'DefaultFont' property and we should add property
editors, so that the user does not get confused.  

What do the others think, should we add 'DefaultFont' (default set to true)?


BTW, I just tested changing the font of a label with
gtk_widgte_modify_style, but always get access violations. Maybe someone can
point me to a working example for gtk 1.2?


Mattias






More information about the Lazarus mailing list