mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
LibWeb: Port FontFace to new Strings
This commit is contained in:
parent
33e9c4e1b2
commit
c2f0b20d6b
5 changed files with 18 additions and 16 deletions
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/URL.h>
|
||||
#include <LibWeb/CSS/UnicodeRange.h>
|
||||
|
||||
|
@ -17,19 +17,19 @@ public:
|
|||
struct Source {
|
||||
AK::URL url;
|
||||
// FIXME: Do we need to keep this around, or is it only needed to discard unwanted formats during parsing?
|
||||
Optional<DeprecatedFlyString> format;
|
||||
Optional<FlyString> format;
|
||||
};
|
||||
|
||||
FontFace(DeprecatedFlyString font_family, Vector<Source> sources, Vector<UnicodeRange> unicode_ranges);
|
||||
FontFace(FlyString font_family, Vector<Source> sources, Vector<UnicodeRange> unicode_ranges);
|
||||
~FontFace() = default;
|
||||
|
||||
DeprecatedFlyString font_family() const { return m_font_family; }
|
||||
FlyString font_family() const { return m_font_family; }
|
||||
Vector<Source> const& sources() const { return m_sources; }
|
||||
Vector<UnicodeRange> const& unicode_ranges() const { return m_unicode_ranges; }
|
||||
// FIXME: font-style, font-weight, font-stretch, font-feature-settings
|
||||
|
||||
private:
|
||||
DeprecatedFlyString m_font_family;
|
||||
FlyString m_font_family;
|
||||
Vector<Source> m_sources;
|
||||
Vector<UnicodeRange> m_unicode_ranges;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue