Question Points, pixels, characters and DPI - How many points in a pixel and how they are all related

More
12 years 4 weeks ago - 10 years 2 months ago #85 by roller
A point is measure of size and 1 point is equal to 1/72 inches, So 72 points are equal to 1 inch. The point measure is used in graphics programs such as Photoshop, in font sizes, in Excel and VBA.

For example in EXCEL the UserForm.Left and UserForm.Top properties in VBA will return the distance of the top corner of the form in points. You will notice that if you position the VBA UserForm in pixel values it doesn’t quiet match to what you expect, that is because the property is in points. If you set the top and left properties to 72 points then your form will be positioned 1 inch from the top corner or 96 pixels (in Windows).

Windows assumes that there are 96 Dpi on the screen, so 96 pixels are equal to 1 inch which is equal to 72 points. To convert between points and pixels on a Windows operating system use the relationship pixels = 96/72*points.

The row height in Excel is in points and is not related to the number of characters. If you adjust your row height to 72 the corresponding number of pixels will be 96 (this is how you can confirm your screen DPI easily!!!).

In Excel if you click on the side of a column you will see Width: 8.43 (64 pixels). The 8.43 is the number of characters you can fit in a cell. This number is based on the default font set in Excel – you can check your Excel default font in 2007 by right clicking on a cell and choosing Format Cells and then the Font tab. The default font and size are those selected when the Default Font tick box is selected. In Excel 2007 the default font is Calibri 11. When you change the column width of Excel cell you will notice that the Width will always round up to the nearest pixel, this is because you can’t have a fractional pixel number.
Last edit: 10 years 2 months ago by roller.

Please Log in or Create an account to join the conversation.

Time to create page: 0.668 seconds
Powered by Kunena Forum