diff --git a/Userland/Libraries/LibWeb/FontCache.cpp b/Userland/Libraries/LibWeb/FontCache.cpp index c39318d151..3d293cc718 100644 --- a/Userland/Libraries/LibWeb/FontCache.cpp +++ b/Userland/Libraries/LibWeb/FontCache.cpp @@ -8,6 +8,8 @@ #include #include +namespace Web { + RefPtr FontCache::get(FontSelector const& font_selector) const { auto cached_font = m_fonts.get(font_selector); @@ -36,3 +38,5 @@ void FontCache::set(FontSelector const& font_selector, NonnullRefPtr #include #include +#include + +namespace Web { struct FontSelector { FlyString family; @@ -24,13 +27,6 @@ struct FontSelector { } }; -namespace AK { -template<> -struct Traits : public GenericTraits { - static unsigned hash(FontSelector const& key) { return pair_int_hash(pair_int_hash(key.family.hash(), key.weight), key.point_size); } -}; -} - class FontCache { public: FontCache() = default; @@ -42,3 +38,12 @@ public: private: mutable HashMap> m_fonts; }; + +} + +namespace AK { +template<> +struct Traits : public GenericTraits { + static unsigned hash(Web::FontSelector const& key) { return pair_int_hash(pair_int_hash(key.family.hash(), key.weight), key.point_size); } +}; +}