mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:27:45 +00:00
LibGfx: Replace a magic number in ScaledFont with the calculation
This makes the reason for the multiplication much clearer.
This commit is contained in:
parent
5f8fd47214
commit
25b89aa962
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue