add central API to calculate UI scaling