1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:57:45 +00:00

LibGfx: Mark Typeface::get_font() const, because it is const

This commit is contained in:
Sam Atkins 2021-08-12 16:26:58 +01:00 committed by Andreas Kling
parent 7106655c86
commit c990340c5a
2 changed files with 2 additions and 2 deletions

View file

@ -38,7 +38,7 @@ void Typeface::set_ttf_font(RefPtr<TTF::Font> font)
m_ttf_font = font; m_ttf_font = font;
} }
RefPtr<Font> Typeface::get_font(unsigned size) RefPtr<Font> Typeface::get_font(unsigned size) const
{ {
for (auto font : m_bitmap_fonts) { for (auto font : m_bitmap_fonts) {
if (font->presentation_size() == size) if (font->presentation_size() == size)

View file

@ -35,7 +35,7 @@ public:
void add_bitmap_font(RefPtr<BitmapFont>); void add_bitmap_font(RefPtr<BitmapFont>);
void set_ttf_font(RefPtr<TTF::Font>); void set_ttf_font(RefPtr<TTF::Font>);
RefPtr<Font> get_font(unsigned size); RefPtr<Font> get_font(unsigned size) const;
private: private:
String m_family; String m_family;