mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
LibWeb: Stop aggressively quantizing font-weight values
Before this change, we were quantizing to either 400, 700 or 900. This caused us to treat 100/200/300 weighted fonts as if they were interchangeable.
This commit is contained in:
parent
4fc5e06837
commit
82ddc813d5
1 changed files with 1 additions and 6 deletions
|
@ -389,12 +389,7 @@ int StyleValue::to_font_weight() const
|
|||
}
|
||||
}
|
||||
if (has_integer()) {
|
||||
int font_weight_integer = to_integer();
|
||||
if (font_weight_integer <= Gfx::FontWeight::Regular)
|
||||
return Gfx::FontWeight::Regular;
|
||||
if (font_weight_integer <= Gfx::FontWeight::Bold)
|
||||
return Gfx::FontWeight::Bold;
|
||||
return Gfx::FontWeight::Black;
|
||||
return to_integer();
|
||||
}
|
||||
if (is_calculated()) {
|
||||
auto maybe_weight = const_cast<CalculatedStyleValue&>(as_calculated()).resolve_integer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue