@reify
    def dpi(self):
        custom_dpi = environ.get('KIVY_DPI')
        if custom_dpi:
            return float(custom_dpi)

        if platform == 'android':
            if USE_SDL2:
                import jnius
                Hardware = jnius.autoclass('org.renpy.android.Hardware')
                return Hardware.getDPI()
            else:
                import android
                return android.get_dpi()
        elif platform == 'ios':
            import ios
            return ios.get_dpi()

        # for all other platforms..
        from kivy.base import EventLoop
        EventLoop.ensure_window()
        return EventLoop.window.dpi
Return the DPI of the screen. Depending on the platform, the DPI can
dataset/ETHPy150Open kivy/kivy/kivy/metrics.py/MetricsBase.dpi