mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
LibWeb/CSS: Parse font-[feature,variation]-settings descriptors
This commit is contained in:
parent
95c17dfab5
commit
e43f3e4808
Notes:
github-actions[bot]
2024-10-02 15:37:32 +00:00
Author: https://github.com/AtkinsSJ
Commit: e43f3e4808
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1599
5 changed files with 102 additions and 3 deletions
|
@ -709,6 +709,26 @@ void dump_font_face_rule(StringBuilder& builder, CSS::CSSFontFaceRule const& rul
|
|||
indent(builder, indent_levels + 1);
|
||||
builder.appendff("language-override: {}\n", font_face.font_language_override().value());
|
||||
}
|
||||
|
||||
if (font_face.font_feature_settings().has_value()) {
|
||||
indent(builder, indent_levels + 1);
|
||||
builder.append("feature-settings:"sv);
|
||||
auto const& entries = font_face.font_feature_settings().value();
|
||||
for (auto const& [name, value] : entries) {
|
||||
builder.appendff(" {}={}", name, value);
|
||||
}
|
||||
builder.append("\n"sv);
|
||||
}
|
||||
|
||||
if (font_face.font_variation_settings().has_value()) {
|
||||
indent(builder, indent_levels + 1);
|
||||
builder.append("variation-settings:"sv);
|
||||
auto const& entries = font_face.font_variation_settings().value();
|
||||
for (auto const& [name, value] : entries) {
|
||||
builder.appendff(" {}={}", name, value);
|
||||
}
|
||||
builder.append("\n"sv);
|
||||
}
|
||||
}
|
||||
|
||||
void dump_import_rule(StringBuilder& builder, CSS::CSSImportRule const& rule, int indent_levels)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue