removed scaling with ctypes shcore for Windows < 8.1

This commit is contained in:
Tom Schimansky
2022-05-26 19:16:01 +02:00
parent 34da9505e9
commit a1afc3056b
6 changed files with 45 additions and 32 deletions

View File

@@ -22,6 +22,9 @@ if sys.platform == "darwin":
else:
DrawEngine.preferred_drawing_method = "font_shapes"
if sys.platform.startswith("win") and sys.getwindowsversion().build < 9000: # No automatic scaling on Windows < 8.1
ScalingTracker.deactivate_automatic_dpi_awareness = True
# load Roboto fonts (used on Windows/Linux)
script_directory = os.path.dirname(os.path.abspath(__file__))
FontManager.load_font(os.path.join(script_directory, "assets", "fonts", "Roboto", "Roboto-Regular.ttf"))