/* * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Ladybird { class FontPlugin final : public Web::Platform::FontPlugin { public: FontPlugin(bool is_layout_test_mode, Gfx::SystemFontProvider* = nullptr); virtual ~FontPlugin(); virtual Gfx::Font& default_font() override; virtual Gfx::Font& default_fixed_width_font() override; virtual RefPtr default_emoji_font(float point_size) override; virtual FlyString generic_font_name(Web::Platform::GenericFont) override; void update_generic_fonts(); private: Vector m_generic_font_names; RefPtr m_default_font; RefPtr m_default_fixed_width_font; bool m_is_layout_test_mode { false }; }; }