
If you want to be more precise in scaling, you could grab the ScreenPixelsPerInch and ScreenSize root properties with get(0.).
Matlab for mac size code#
Figure out what looks good on Mac, and then scale it in your code to something like windows_font_size = floor(mac_font_size * 0.8) and see how it goes. So apply a scaling factor to the font sizes you set in your GUI. (Generally YMMV depending on your display DPI and system settings and other things.) For example, I run my terminals and text editors at 10 or 12 points in Windows, but 14 point or larger on Mac. Working with 'pixels' or inches/centimeters/points, which are absolute, will probably give you more uniform results across operating systems.Īnd you're not wrong: OS X tends to display fonts of a given size on screen smaller than Windows does.

That's going to differ between different operating systems. Which specific Matlab page recommended that you do so? Was it talking about cross-platform portability? The characters unit is very convenient to work with, but it is tied to the font metrics for the default system font. Setting 'Units' to 'characters' is probably the wrong way to go for portability, and could be the main cause of your display sizing issues. Try working in 'pixels' or absolute size units instead of 'characters', and apply a scaling factor to your font sizes. I have however, specified font sizes, but apparently, 12 point font on windows appears very different from 12 point font on mac.Īre there any ways around these problems? I thought setting a specified font size and allowing for use of default fonts would fix this, but it hasn't, and I'm a little dry for ideas at this point. I've set all "Units" to "characters" as suggested by the Mathworks help page, and I do not specify any fonts to allow each system to use its default. On the Mac, they look perfectly fine, but on the windows system, the sizing is completely off. Some of my GUIs use axes to display text and model chemical reaction animations. An axis that appears square on my Mac will appear elongated or rectangular on windows, and vice versa.ģ) Graphical displays are different. This results in some of my button titles simply going off the button, or panel titles moving beyond the panel.Ģ) Axes appear to be different dimensions between Mac and Windows.

I use a Mac running OSX to write all of my code, and the problem I've encountered is that it there are deviations in appearance when the GUIs are used in windows, some of which are minor, and some of which are very significant.ġ) The text in the windows version is substantially larger overall.

Matlab for mac size series#
For some time now, I've been working on a series of GUIs.
