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
Notes:
sideshowbarker
2024-07-17 05:23:40 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/25b89aa962 Pull-request: https://github.com/SerenityOS/serenity/pull/20084 Reviewed-by: https://github.com/nico ✅
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
Reference in a new issue