diff --git a/Userland/Libraries/LibGfx/Typeface.cpp b/Userland/Libraries/LibGfx/Typeface.cpp index 0a2fa337de..17fd08b266 100644 --- a/Userland/Libraries/LibGfx/Typeface.cpp +++ b/Userland/Libraries/LibGfx/Typeface.cpp @@ -38,7 +38,7 @@ void Typeface::set_ttf_font(RefPtr font) m_ttf_font = font; } -RefPtr Typeface::get_font(unsigned size) +RefPtr Typeface::get_font(unsigned size) const { for (auto font : m_bitmap_fonts) { if (font->presentation_size() == size) diff --git a/Userland/Libraries/LibGfx/Typeface.h b/Userland/Libraries/LibGfx/Typeface.h index ae3a235b81..818cb5a760 100644 --- a/Userland/Libraries/LibGfx/Typeface.h +++ b/Userland/Libraries/LibGfx/Typeface.h @@ -35,7 +35,7 @@ public: void add_bitmap_font(RefPtr); void set_ttf_font(RefPtr); - RefPtr get_font(unsigned size); + RefPtr get_font(unsigned size) const; private: String m_family;