sábado, 15 de agosto de 2009

Configuring screen font multiplatform

Configuring screen font multiplatform

Who develops applications multiplatforms, many times has the problem of appearance generated for the screen font, that always finishes annoying. I decided this problem manually defining the font that would be used in linux, and another font in windows, thus:
{$IFDEF LINUX}
self.font.name: =' Helvetica' ;
{$ENDIF}
Thus, in linux ' used font; Helvetica' e in windows font ' Ms Sans Serif'. Of course he was not perfect, therefore the sizes are different.
This when I used kylix3.
But now, with lazarus and widget QT, I obtained the solution this problem of satisfactory form. Of them you vary fonts that I tested, I discovered that font Verdana has accurately the same resulted visual, as much in windows as in linux, to worry thus not necessary me in being change labels width, to fit the text in both the operational systems.
Therefore, before drawing any visual component in form, I changed font to Verdana. He is not font prettier, but it did not give to continue of the skill that was, therefore to configure one font for windows and another one for linux is complicated.

Also standard of applications QT in the QTConfig is possible to configure font, but I do not advise to make this.
This procedure was tested only in linux (not use widget QT in windows)
If somebody already decided this problem in another way, accepted you criticize and suggestions. In next post, I will show as I decided the problem to inside execute lazarus under wine, correcting that one bug of the directory, that it hinders to open the projects under wine.
Until the next one.

Um comentário:

  1. Hello
    The easiest way to avoid this problem with opening projects in Lazarus under wine is to drag a .lpi file onto the Lazarus IDE.

    ResponderExcluir