FontFace.h 647 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/FlyString.h>
  8. #include <AK/URL.h>
  9. namespace Web::CSS {
  10. class FontFace {
  11. public:
  12. struct Source {
  13. AK::URL url;
  14. };
  15. FontFace(FlyString font_family, Vector<Source> sources);
  16. ~FontFace() = default;
  17. FlyString font_family() const { return m_font_family; }
  18. Vector<Source> const& sources() const { return m_sources; }
  19. // FIXME: font-style, font-weight, font-stretch, unicode-range, font-feature-settings
  20. private:
  21. FlyString m_font_family;
  22. Vector<Source> m_sources;
  23. };
  24. }