19 pixels_per_inch_f ppi;
26 return pixels(lhs.density_scale() * rhs.in(dips));
36 template<
typename Unit,
typename T>
43 template<
typename Unit,
typename T>
90 return pixels_per_em(lhs.density_scale() * rhs.in(dips_per_em));
104 return lhs.ppi * rhs;
133 return *dips_per_em_ptr * lhs;
135 return *pixels_per_em_ptr * lhs;
137 return *points_per_em_ptr * lhs;
153 [[nodiscard]]
constexpr float density_scale()
const noexcept
184 auto const base_density = std::to_underlying(type) & 0xf8;
187 auto const index =
static_cast<unsigned int>(ppi.in(pixels_per_inch)) * 4 / base_density;
192 if (index < scale_table.size()) {
193 return scale_table[index];
195 return scale_table.back();