[Lazarus] Cross-platform project. Font sizes not the same....

Bo Berglund bo.berglund at gmail.com
Tue Aug 20 23:47:39 CEST 2019


I have just transfered a simple 3-form project from Windows7 to Linux
(Raspbian on RPi4).
I am using the same versions of Fpc and Lazarus on both (3.0.4 and
2.0.4).

The project compiled fine after the transfer to Raspbian as it did on
Windows.

But the form is very much in need of control changes since text no
longer fits in the controls. Edit boxes grow a lot in height and so
on.
I can go into the font property of affected controls and change the
font size to make it look better, but there are so many...

If this is the normal case I don't see how I can maintain two versions
from the same sources, I cannot ifdef UNIX vs Windows every place a
font is mentioned in the code, in fact it is not even in the code but
inside the form file (lfm)...

There must be something I have done wrong here, but what?
Any porting advice somewhere?

I did not set font sizes at all in Lazarus on Windows. it used the
defaults and when I check they are set to be 9. But in Lazarus on
Linux the font size on the form is 10. It makes quite a difference.

Is there some global project setting for the fonts that I can use to
make the project cross-platform withut code changes?


-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list