LibGfx: Replace a magic number in ScaledFont with the calculation

This makes the reason for the multiplication much clearer.
This commit is contained in:
Matthew Olsson 2023-07-18 18:35:58 -07:00 committed by Sam Atkins
parent 5f8fd47214
commit 25b89aa962
Notes: sideshowbarker 2024-07-17 05:23:40 +09:00

View file

@ -22,7 +22,7 @@ ScaledFont::ScaledFont(NonnullRefPtr<VectorFont> font, float point_width, float
auto metrics = m_font->metrics(m_x_scale, m_y_scale);
m_pixel_size = m_point_height * 1.33333333f;
m_pixel_size = m_point_height * (DEFAULT_DPI / POINTS_PER_INCH);
m_pixel_size_rounded_up = static_cast<int>(ceilf(m_pixel_size));
m_pixel_metrics = Gfx::FontPixelMetrics {