Confusion over font size and DPI on Apple Mac lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- carl_caulkett · 2017-07-10 12:35 Hello, I'm currently writing a font selector control, and for the purposes of setting a default size value, I am using the following code: 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 procedure TcaFontSelecter.InitSelectedFontProperties;var  FontData: TFontData;  PPI: Integer;begin  FontData := GetFontData(FLabel.Font.Handle);  PPI := Forms.Screen.PixelsPerInch;  FontData.Height := -FontData.Height;  // GetFontData returns Height as a +ve value  FSelectedFont.Name := FontData.Name;  FSelectedFont.Size := -MulDiv(FontData.Height, 72, PPI) // This should give Size as a +ve valueend;  The weird thing is that FLabel, the source of the GetFontData call, is made visible in this component, and visually, at least, appears to have the same size font as a standard TLabel, dropped straight on the form. I would expect, therefore, for the Height as returned by GetFontData to be -13 (as noted, GetFontData is returning a +ve value), and the resultant value of FSelectedFont.Size to be 10. For some reason, which I suspect is to do with of DPI related factors, the Height as returned by GetFontData is actually 16, giving a FSelectedFont.Size to be 12. I'm sure I read somewhere recently, that recent changes to Lazarus on the Apple Mac, mean that adjustments have to be made in order for font sizes to work properly but I didn't make a note of it. Can anyone shed some light on this question? Thanks, Carl