use window.devicePixelRatio to calculate the pixel size of an avatar