1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:37:45 +00:00

LibWeb+LibGfx: Move UnicodeRange from LibWeb to LibGfx

In upcoming changes UnicodeRange is going to be used in LibGfx in
a class that represents font cascade list.
This commit is contained in:
Aliaksandr Kalenik 2023-12-09 23:30:01 +01:00 committed by Andreas Kling
parent 0d03257e69
commit f50bf00814
8 changed files with 20 additions and 22 deletions

View file

@ -9,7 +9,7 @@
#include <AK/FlyString.h>
#include <AK/URL.h>
#include <LibWeb/CSS/UnicodeRange.h>
#include <LibGfx/Font/UnicodeRange.h>
namespace Web::CSS {
@ -21,14 +21,14 @@ public:
Optional<FlyString> format;
};
FontFace(FlyString font_family, Optional<int> weight, Optional<int> slope, Vector<Source> sources, Vector<UnicodeRange> unicode_ranges);
FontFace(FlyString font_family, Optional<int> weight, Optional<int> slope, Vector<Source> sources, Vector<Gfx::UnicodeRange> unicode_ranges);
~FontFace() = default;
FlyString font_family() const { return m_font_family; }
Optional<int> weight() const { return m_weight; }
Optional<int> slope() const { return m_slope; }
Vector<Source> const& sources() const { return m_sources; }
Vector<UnicodeRange> const& unicode_ranges() const { return m_unicode_ranges; }
Vector<Gfx::UnicodeRange> const& unicode_ranges() const { return m_unicode_ranges; }
// FIXME: font-stretch, font-feature-settings
private:
@ -36,7 +36,7 @@ private:
Optional<int> m_weight { 0 };
Optional<int> m_slope { 0 };
Vector<Source> m_sources;
Vector<UnicodeRange> m_unicode_ranges;
Vector<Gfx::UnicodeRange> m_unicode_ranges;
};
}