(root)
Scale fonts on HiDPI displays.
Scale fonts on HiDPI displays.
Scale fonts on HiDPI displays .
def fix_scaling(root):
    """Scale fonts on HiDPI displays."""
    import tkinter.font
    scaling = float(root.tk.call('tk', 'scaling'))
    if scaling > 1.4:
        for name in tkinter.font.names(root):
            font = tkinter.font.Font(root=root, name=name, exists=True)
            size = int(font['size'])
            if size < 0:
                font['size'] = round(-0.75*size)
def fix_scaling ( root ) : import tkinter . font scaling = float ( root . tk . call ( 'tk' , 'scaling' ) ) if scaling > 1.4 : for name in tkinter . font . names ( root ) : font = tkinter . font . Font ( root = root , name = name , exists = True ) size = int ( font [ 'size' ] ) if size < 0 : font [ 'size' ] = round ( - 0.75 * size )