mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:47:36 +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:
parent
861d22838d
commit
08517daa5a
5 changed files with 216 additions and 129 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue