mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Wrap font metrics into a struct
Rather than passing an increasingly-unwieldy number of font parameters individually to every function that resolves lengths, let's wrap them up. This is frustratingly close to being `Gfx::FontPixelMetrics`, but bitmap fonts cause issues: We choose the closest font to what the CSS requests, but that might have a wildly different size than what the page expects, so we have to fudge the numbers. No behaviour changes.
This commit is contained in:
parent
4a191875a9
commit
0679b4e0b9
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/AtkinsSJ
Commit: 0679b4e0b9
Pull-request: https://github.com/SerenityOS/serenity/pull/18563
14 changed files with 107 additions and 62 deletions
|
@ -338,7 +338,7 @@ StyleValueList const& StyleValue::as_value_list() const
|
|||
return static_cast<StyleValueList const&>(*this);
|
||||
}
|
||||
|
||||
ValueComparingNonnullRefPtr<StyleValue const> StyleValue::absolutized(CSSPixelRect const&, Gfx::FontPixelMetrics const&, CSSPixels, CSSPixels, CSSPixels, CSSPixels) const
|
||||
ValueComparingNonnullRefPtr<StyleValue const> StyleValue::absolutized(CSSPixelRect const&, Length::FontMetrics const&, Length::FontMetrics const&) const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue