Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-05

TFont.Assign not complete

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexey

Not sure it is ok, why not to a) copy Size, b) copy PixelsPerInch. why such strange logic.

           if TFont(Source).PixelsPerInch  FPixelsPerInch then
             // use size to convert source height pixels to current
resolution
             Size := TFont(Source).Size
           else
             // use height which users could have changed directly
             Height := TFont(Source).Height;

Also good to copy PixelsPerInch to do good copy

Regards, Alexey

Reply by email

Vojtěch Čihák

Hi,
 
IMO it should be OK. PixelsPerInchs has probably meaning when you have two displays with different DPI. Therefore copying the value PixelsPerInchs is wrong because method Assign() cannot know where the font will be displayed (on the same display or the second display with different DPI).  
V.
 

Reply by email