mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibWeb: Parse src: local(...) in CSS @font-face rules
Note that we don't load the local font as specified, but at least we no longer reject such src properties in the CSS parser. This makes the custom fonts used on http://apple.com/ actually load. :^)
This commit is contained in:
@@ -654,7 +654,10 @@ void dump_font_face_rule(StringBuilder& builder, CSS::CSSFontFaceRule const& rul
|
||||
builder.append("sources:\n"sv);
|
||||
for (auto const& source : font_face.sources()) {
|
||||
indent(builder, indent_levels + 2);
|
||||
builder.appendff("url={}, format={}\n", source.url, source.format.value_or("???"_string));
|
||||
if (source.local_or_url.has<AK::URL>())
|
||||
builder.appendff("url={}, format={}\n", source.local_or_url.get<AK::URL>(), source.format.value_or("???"_string));
|
||||
else
|
||||
builder.appendff("local={}\n", source.local_or_url.get<AK::String>());
|
||||
}
|
||||
|
||||
indent(builder, indent_levels + 1);
|
||||
|
||||
Reference in New Issue
Block a user