FontPlugin.cpp 411 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Platform/FontPlugin.h>
  7. namespace Web::Platform {
  8. static FontPlugin* s_the;
  9. FontPlugin& FontPlugin::the()
  10. {
  11. VERIFY(s_the);
  12. return *s_the;
  13. }
  14. void FontPlugin::install(FontPlugin& plugin)
  15. {
  16. VERIFY(!s_the);
  17. s_the = &plugin;
  18. }
  19. FontPlugin::~FontPlugin() = default;
  20. }