What is “size”?
When talking about concepts like
FontSize, row/column height within a grid or any other size/scale functions, what units is Mathematica referring to? How are these related to the pixels on the default 100% notebook magnification?
The main reason I'm asking this is because I want to scale a program so that it fits any monitor it is rendered and displayed on. However, I don't really understand how size units are defined in Mathematica.
This must be naturally explained somewhere, but I couldn't find it and so any references are appreciated.
There is no universal unit in Mathematica. You will need to check the documentation for each size setting.
Commonly used units include:
"Points" usually correspond to pixels on the screen (with Mathematica's default 72 dpi resolution) or printer's points in print. Examples:
Sometimes, point sizes can be used in contexts where the default unit is something else through the
Plot coordinates use the coordinate system of graphics. This is how numbers are interpreted in graphics primitives. Some options, such as
PlotRangePaddingalso use this.
Scaled sizes/coordinates are relative to some larger object, which may differ from case to case.
Scaledis relative to the plot area when used in graphics. It is relative to the notebook width when used in the
ImageScaledis relative to the figure size. And so on.
In most cases, scaled sizes must be explicitly indicated with the
ImageScaled) wrapper and can be used in contexts where the default unit is something different.
Units relative to the font size: this is often ems for widths and line height for heights. Examples:
ItemSize, etc. These are typically used in the context of