mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
LibWeb: Add Node::scaled_font(float scale_factor)
This will allow fetching fonts scaled by a transform.
This commit is contained in:
parent
f84abbe1f9
commit
21ace4f90b
1 changed files with 7 additions and 1 deletions
|
@ -123,6 +123,7 @@ public:
|
|||
|
||||
Gfx::Font const& font() const;
|
||||
Gfx::Font const& scaled_font(PaintContext&) const;
|
||||
Gfx::Font const& scaled_font(float scale_factor) const;
|
||||
|
||||
CSS::ImmutableComputedValues const& computed_values() const;
|
||||
CSSPixels line_height() const;
|
||||
|
@ -253,7 +254,12 @@ inline Gfx::Font const& Node::font() const
|
|||
|
||||
inline Gfx::Font const& Node::scaled_font(PaintContext& context) const
|
||||
{
|
||||
return *FontCache::the().scaled_font(font(), context.device_pixels_per_css_pixel());
|
||||
return scaled_font(context.device_pixels_per_css_pixel());
|
||||
}
|
||||
|
||||
inline Gfx::Font const& Node::scaled_font(float scale_factor) const
|
||||
{
|
||||
return *FontCache::the().scaled_font(font(), scale_factor);
|
||||
}
|
||||
|
||||
inline const CSS::ImmutableComputedValues& Node::computed_values() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue