/* * Copyright (c) 2022-2023, Sam Atkins * Copyright (c) 2023, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Web::CSS { class ParsedFontFace { public: struct Source { Variant local_or_url; // FIXME: Do we need to keep this around, or is it only needed to discard unwanted formats during parsing? Optional format; }; ParsedFontFace(FlyString font_family, Optional weight, Optional slope, Vector sources, Vector unicode_ranges); ~ParsedFontFace() = default; FlyString font_family() const { return m_font_family; } Optional weight() const { return m_weight; } Optional slope() const { return m_slope; } Vector const& sources() const { return m_sources; } Vector const& unicode_ranges() const { return m_unicode_ranges; } // FIXME: font-stretch, font-feature-settings private: FlyString m_font_family; Optional m_weight { 0 }; Optional m_slope { 0 }; Vector m_sources; Vector m_unicode_ranges; }; }