/* * Copyright (c) 2024, Andrew Kaster * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::CSS { class FontFaceSet final : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(FontFace, Bindings::PlatformObject); JS_DECLARE_ALLOCATOR(FontFaceSet); public: [[nodiscard]] static JS::NonnullGCPtr construct_impl(JS::Realm&, Vector> initial_faces); [[nodiscard]] static JS::NonnullGCPtr create(JS::Realm&); virtual ~FontFaceSet() override = default; JS::NonnullGCPtr add(JS::Handle face); JS::ThrowCompletionOr> load(String const& font, String const& text); private: FontFaceSet(JS::Realm&, Vector> initial_faces); virtual void initialize(JS::Realm&) override; }; }