TForm.ScaleBy bug? lazarus / 31-LCL ---------------------------------------------------------------------- Handoko · 2017-12-31 08:30 Did I do it wrong or is it a bug?  TForm.ScaleBy seems to work correctly on images and buttons but not on texts. Tested on Lazarus 1.8.0 Gtk2 on Ubuntu Mate 17.10 64-bit. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, ExtCtrls, StdCtrls; type   { TForm1 }   TForm1 = class(TForm)    btnSmaller: TButton;    btnBigger: TButton;    Image1: TImage;    Label1: TLabel;    Shape1: TShape;    procedure btnBiggerClick(Sender: TObject);    procedure btnSmallerClick(Sender: TObject);    procedure FormCreate(Sender: TObject);  end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.btnSmallerClick(Sender: TObject);begin  ScaleBy(1, 2);end; procedure TForm1.btnBiggerClick(Sender: TObject);begin  ScaleBy(2, 1);end; procedure TForm1.FormCreate(Sender: TObject);begin  Image1.Picture.LoadFromFile(ExtractFilePath(ParamStr(0))+'project1.ico ');  Image1.Stretch := True;end; end. ---------------------------------------------------------------------- Handoko · 2017-12-31 08:44 It is a bug. I found someone already reported it on the bug tracker forum: https://bugs.freepascal.org/view.php?id=26652 ---------------------------------------------------------------------- jamie · 2017-12-31 19:27 in the windows environment the fonts are scaled by the OS to fit the current Dots per inch.. so font scaling there should not be touched unless its a non-windows managed control but even then, if that type of control is using the parent canvas, which most likely it is, then the scaling for the font should carry over..  As  for the  other platforms, I can't say, but if you are using the scaleBy to change the scene, then I think you'll also need to scale the fonts too.  I come from a Windows environment and that is how it's done..