mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb/CSS: Parse font-display descriptor
This commit is contained in:
parent
19cb3d4c81
commit
3eb6d510fd
Notes:
github-actions[bot]
2024-09-28 12:43:50 +00:00
Author: https://github.com/AtkinsSJ
Commit: 3eb6d510fd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1554
7 changed files with 39 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <AK/FlyString.h>
|
||||
#include <LibGfx/Font/UnicodeRange.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWeb/CSS/Enums.h>
|
||||
#include <LibWeb/CSS/Percentage.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
@ -22,11 +23,12 @@ public:
|
|||
Optional<FlyString> format;
|
||||
};
|
||||
|
||||
ParsedFontFace(FlyString font_family, Optional<int> weight, Optional<int> slope, Vector<Source> sources, Vector<Gfx::UnicodeRange> unicode_ranges, Optional<Percentage> ascent_override, Optional<Percentage> descent_override, Optional<Percentage> line_gap_override);
|
||||
ParsedFontFace(FlyString font_family, Optional<int> weight, Optional<int> slope, Vector<Source> sources, Vector<Gfx::UnicodeRange> unicode_ranges, Optional<Percentage> ascent_override, Optional<Percentage> descent_override, Optional<Percentage> line_gap_override, FontDisplay font_display);
|
||||
~ParsedFontFace() = default;
|
||||
|
||||
Optional<Percentage> ascent_override() const { return m_ascent_override; }
|
||||
Optional<Percentage> descent_override() const { return m_descent_override; }
|
||||
FontDisplay font_display() const { return m_font_display; }
|
||||
FlyString font_family() const { return m_font_family; }
|
||||
Optional<int> slope() const { return m_slope; }
|
||||
Optional<int> weight() const { return m_weight; }
|
||||
|
@ -43,6 +45,7 @@ private:
|
|||
Optional<Percentage> m_ascent_override;
|
||||
Optional<Percentage> m_descent_override;
|
||||
Optional<Percentage> m_line_gap_override;
|
||||
FontDisplay m_font_display;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue