1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:17:35 +00:00

LibWeb: Improvements to font lookup

Parse out the font-family, font-size and font-weight values from CSS
and use them to perform a kinda-best-effort lookup against the system
font library.

We also now handle standard font names like "sans-serif", "monospace"
and others.
This commit is contained in:
Andreas Kling 2020-12-14 15:56:01 +01:00
parent 861d22838d
commit 08517daa5a
5 changed files with 216 additions and 129 deletions

View file

@ -1,5 +1,5 @@
html {
font-family: Katica;
font-family: sans-serif;
}
head,
@ -18,6 +18,7 @@ body {
h1,
h2 {
font-family: Pebbleton;
font-size: 14px;
font-weight: bold;
}
@ -29,14 +30,14 @@ h6 {
}
pre {
font-family: Csilla;
font-family: monospace;
margin-bottom: 8px;
margin-top: 8px;
white-space: pre;
}
code {
font-family: Csilla;
font-family: monospace;
}
u,