One thing I've noticed is that when you set the font-size in the popup/phantom CSS, it doesn't respect the font scaling in Windows. I have a windows system with a 4K monitor and the font set at 125% which is about 120dpi. And when I set my font size in a popup/phantom, the font sizes are 25% too small.
In order to fix this, I had to detect the font size and make adjustments to what I set in the CSS:
"""Get font scale."""
scale = 1.0
if sublime.platform() == 'windows':
LOGPIXELSY = 90
dc = ctypes.windll.user32.GetDC(0)
height = ctypes.windll.gdi32.GetDeviceCaps(dc, LOGPIXELSY)
scale = float(height) / 96.0
Anyways, it would be great if when setting a font in the CSS, the scaling was taken into consideration automatically. I have currently only looked into this on Windows, but it might be an issue on other platforms as well.