Any font rendered by the system is going to look different from OS to OS, even if it is a “web safe font”. The same font files on different operating systems may even produce different results!
The answer is to use web fonts, which are hosted online and partially rendered by the browser. Things like Google Web Fonts and Font Awesome are examples. The browser itself if responsible for most of the rendering process, however the subpixel rendering or anti-aliasing differs from OS to OS. For example, Google Chrome and Firefox may look slightly different, but Firefox on Ubuntu, Mac, and Windows will all render the font the same way – meaning that they will look identical in size, thickness, and spacing on all operating systems. Mac for example, won’t use subpixel rendering, but it will line up with other operating systems on the same browser just fine.
Comments
The difference might be as small as having different versions (e.g. 1.1 vs 1.2) to as large as having two different fonts with the same name (Garamond). Granted, most foundries distinguish their version of a font (like Garamond) by including their foundry name in the actual font name.
Secondly, a foundry may build their desktop and web fonts differently. In some cases, a foundry may choose to "equalize" their vertical metrics in their web font (for the sake of consistency across browsers), but the desktop font may have differing values.
But, as Matthew suggests, unless you are personally involved in the hosting of the web font, you may have great difficulty determining if they are exactly the same font (or derived in some way that does not affect the on-screen rendering).
I know that Chrome will employ a FreeType-based rendering path for variable web fonts. But I'm not sure what it will do for installed variable fonts.
As you can see from the issues listed below, Chrome switches between FreeType and the systen renderer depending on the particular font flavor, and particular OS. I think the newest Chrome uses FreeType for all variable fonts on all Windows and on macOS <10.12, and for CFF2 variable fonts on all systems, but on macOS 10.12 and newer, it uses CoreText for TT-flavored variable fonts. It’s complicated, but my understanding is that they use FreeType as a fallback but prefer to use the system.
https://bugs.chromium.org/p/chromium/issues/detail?id=714553
https://bugs.chromium.org/p/chromium/issues/detail?id=713529
https://bugs.chromium.org/p/chromium/issues/detail?id=815251