11
votes

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?

1
Our team's solution is that every developer that touches .dfm files uses small fontsDavid Heffernan
That would require a logout from Windows when changing the Windows font size. Is there any better solution like start Delphi in 96 PPI even if Windows is large font?Chau Chee Yang
If there is another way, I haven't found it.David Heffernan
nice question, I have the same problem with 120dpi fontsteran
You might want to read the article by Zarko Gajic, Multi-Resolution Delphi Applications. There is source code to test a form with different screen resolutions. Might be worth a test. Personally I always set the Scaled property of a form to false.LU RD

1 Answers

4
votes

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.