Different Font sizes?

Started by James Zukowski, March 02, 2022, 06:02:53 PM

Previous topic - Next topic

James Zukowski

After our application starts, I've noticed that the Font reported with fin(0,"Font") [Lucida Console,-19] is different from the font listed on the WindX icon's font info [Lucida Console / Regular / 14]. Any idea what would cause this discrepancy? It seems to affect some of our Nomads panels.
All of the pvx.ini and pxplus.ini files I've seen on the server and my PC report no specific size, or a size of 19pt.

Thanks, all!
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Mike King

The font reported in the system menu is managed by the system and the value is the Point size of the font (i.e the number of 1/72 of an inch).  The negative font size is the actual number of Pixels for the font.

Depending on mapping between the point size and the number of pixels will make these values different.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

James Zukowski

According to the documentation for the 'FONT' mnemonic ('OPTION' and others refer back to this), "Use negative sizes for absolute font size in points." There is no mention of pixels.

Please clarify.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Mike King

We will probably need to clarify that a bit more in the documentation.

For PDF and PRINTERS a negative value is indeed the Point size since using Pixels there would be challenging as on a printer the pixel size is effectively the DPI setting which can vary by printer and would be base on printer settings (i.e. if we used Pixels the output would vary if the user selected 600DPI vs 300DPI or 1200DPI). 

For PDF's there really is no such thing as Pixel addressing, the best we can provide there is also Points.

Now for the screen output, a negative size indicates the Pixel size since that is more useful than a point size, not to mention a 24 inch monitor would then by definition display differently than a 30 inch or 18 inch monitor if we really used Point size.  Even Windows itself fakes out the point size when you select the font size using the Windows font selector and for much the same reason.

Trying to convert pixels to points on a Monitor would be extremely challenging when you consider screen sizes, screen resolutions, Windows Font size zooming, etc.. Given this, we used pixels for font sizes on screen output.

Now all that being said, we normally suggest your screen output fonts use positive numbers which are relative to the currently selected font size.  This provides control back to the end user, allowing them the change the screen font size based on their specific monitor (and their ability to read the fonted output).

Printed output is generally based on the paper and report contents thus points make much more sense.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com