problem with TsFont in fpspread lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- kjteng · 2018-05-26 09:57 I noticed that the the size property of tsFont is of 'single' type where  normal tfont size is of integer type.  Is there any different  between the tsfont.size and tfont.size ? ---------------------------------------------------------------------- wp · 2018-05-26 10:33 I think this came in in the early days of fpspreadsheet when visual controls did not exist yet. The font in xls files, is stored in units of "twips", i.e. 1/20 point, which makes the font size more accurate than an integer. Avoiding this strange definition it was decided to store the font size as single. ---------------------------------------------------------------------- kjteng · 2018-05-27 02:06 So if I assign tfont1.Size := round(tsfont1.size), the font size would be quite the same. I mean no special conversion required ? ---------------------------------------------------------------------- Thaddy · 2018-05-27 07:54 Well there are 20 twips in a point and 72 points in an inch. The ratio is that as such a font can be used with high precision on multiple devices including printers. They are real world absolute measurements, not pixels. To convert to pixels you need to know screen size and resolution. On Windows that requires a call to GetDeviceCaps. Because of this, I would not change it at all. ---------------------------------------------------------------------- wp · 2018-05-27 08:13 Quote from: kjteng on May 27, 2018, 04:06:41 amSo if I assign tfont1.Size := round(tsfont1.size), the font size would be quite the same. I mean no special conversion required ? Correct. But in the WorksheetGrid, the ZoomFactor of the worksheet may be active, then the "real" canvas font size is multiplied by this factor. ---------------------------------------------------------------------- kjteng · 2018-05-27 08:51 TQ