Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to always persist PixelsPerInch = 96 in DFM files even if Windows use medium font size (125%)

I set my Windows 7 font size to medium (125%). When I open a form Delphi XE2 IDE, the PixelsPerInch in DFM files always set to 120 automatically. Using smaller font size in Windows (100%) makes PixelsPerInch to 96 in Delphi DFM files.

This create a problem when coding in team environment. Most team members use smaller font size (100% or 96 PPI). All DFM files store in version control repository is using 96 PPI. If I commit my DFM files that use 120 PPI to repository, all others team members will confuse about what I have changed to the DFM files. All properties related to size, width or height will be changed.

Is that possible to force Delphi IDE to save the DFM in 96 PPI when working with 120 PPI windows environment?

like image 388
Chau Chee Yang Avatar asked Jun 19 '12 08:06

Chau Chee Yang


1 Answers

I have wrote a Delphi IDE open tools to tweak the the form designer in Delphi IDE. The tool attempt to let user design form in fixed scale of stored PixelPerInch in form regardless of Windows font size. It prevent the form designer to scale the form to Windows font size. The original PixelsPerInch property should maintain when saving the changes of forms.

The code has submitted to Embarcadero Code Central: 28922.

like image 50
Chau Chee Yang Avatar answered Oct 31 '22 10:10

Chau Chee Yang