Changeset 47 for trunk/ScreenTools.pas


Ignore:
Timestamp:
Jan 11, 2017, 8:31:41 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: All fonts were slightly bigger then under Delphi. Compensated font size using coefficient.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ScreenTools.pas

    r46 r47  
    99  {$ENDIF}
    1010  StringTables,
    11   LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls,
     11  LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls,
    1212  Forms, Menus;
    1313
     
    15511551LogoBuffer := TBitmap.create;
    15521552LogoBuffer.PixelFormat := pf24bit;
    1553 LogoBuffer.Width := wBBook;
    1554 LogoBuffer.Height := hBBook;
     1553LogoBuffer.SetSize(wBBook, hBBook);
    15551554
    15561555section := ftNormal;
     
    15921591                UniFont[section].Style := UniFont[section].Style + [fsItalic];
    15931592            end;
     1593          // 0.8 constant is compensation for Lazarus as size of fonts against Delphi differs
    15941594          UniFont[section].size :=
    1595             round(size * 72 / UniFont[section].PixelsPerInch);
    1596         end
    1597       end
     1595            round(size * 72 / UniFont[section].PixelsPerInch * 0.8);
     1596        end;
     1597      end;
    15981598  end;
    15991599  CloseFile(fontscript);
Note: See TracChangeset for help on using the changeset viewer.