On 12/3/05, João Paulo Schwarz Schuler <[EMAIL PROTECTED]> wrote:
> Hi. This is my first day here. (my English is poor). I am very well
> impressed with Lazarus.

Welcome. Good to hear you liked the project =)

> So, I compiled this same program on Lazarus (Linux). On that time, I saw all
> my labels were on a new size (new font). Exists a way on getting labels with
> the same size on Linux and Windows?
>
> I do not like the idea on using Windows fonts on Linux. I prefer to use open
> fonts on Windows.

You can add initialization code, perhaps on the create event of the
form, and circle throught all labels changing their font property
acording to the platform. Then you need to choose one font and
font-size for Windows and another for Linux.

You can create a conditional compile to choose the font like this:

{$IFDEF Win32}
  Execute code to change the fonts to windows defaults
{$ELSE}
  Execute code to change the fonts to Linux defaults
{$ENDIF}

Does anyone know how to access all the components witch are owned by the window?

This way you don´t need to add code for each label. I bet you can
create a loop witch iterates for all components owned by the Windows
and then check if the component is a TLabel. If so change the font.

Something like:

for each component owned by TMyWindows do
if Component is TLabel do
begin
end;

Be carefull that Windows has standard fonts, but on linux you will
need to choose very carefully the font you are using because they are
no so standarized.

I like "Bitstream Vera", but the last time I used it, it showed on my
Mandrake but was not present on the Deam Small Linux I ran the
program. It was not a big deal. Lazarus automatically chooses another
font if the one you set is not present, the only thing is that some
labels were outside the form area.

I think that there is a list of Fonts available on the system on the
Screen object or something similar...

--
Felipe Monteiro de Carvalho

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to