mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibWeb: Understand the format()
part of a @font-face
's src
This is used to skip downloading fonts in formats that we don't support. Currently we only support TTF as far as I am aware. The parts of a `src` are in a fixed order, unusually, which makes the parsing more nesty instead of loopy.
This commit is contained in:
parent
dbb0b68175
commit
12b8570ce3
4 changed files with 91 additions and 28 deletions
|
@ -578,7 +578,7 @@ void dump_font_face_rule(StringBuilder& builder, CSS::CSSFontFaceRule const& rul
|
|||
builder.append("sources:\n");
|
||||
for (auto const& source : font_face.sources()) {
|
||||
indent(builder, indent_levels + 2);
|
||||
builder.appendff("{}\n", source.url);
|
||||
builder.appendff("url={}, format={}\n", source.url, source.format.value_or("???"));
|
||||
}
|
||||
|
||||
indent(builder, indent_levels + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue