mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-28 12:18:56 +00:00
LibGfx+LibWeb: Store Typeface and Font-related types in RefPtr to const
This commit is contained in:
parent
ffd0259bef
commit
be2dd91289
Notes:
github-actions[bot]
2025-04-16 16:44:15 +00:00
Author: https://github.com/ADKaster
Commit: be2dd91289
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4362
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/Hendiadyoin1
13 changed files with 28 additions and 28 deletions
|
@ -16,7 +16,7 @@
|
|||
|
||||
namespace Gfx {
|
||||
|
||||
ScaledFont::ScaledFont(NonnullRefPtr<Typeface> typeface, float point_width, float point_height, unsigned dpi_x, unsigned dpi_y)
|
||||
ScaledFont::ScaledFont(NonnullRefPtr<Typeface const> typeface, float point_width, float point_height, unsigned dpi_x, unsigned dpi_y)
|
||||
: m_typeface(move(typeface))
|
||||
, m_point_width(point_width)
|
||||
, m_point_height(point_height)
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Gfx {
|
|||
|
||||
class ScaledFont final : public Gfx::Font {
|
||||
public:
|
||||
ScaledFont(NonnullRefPtr<Typeface>, float point_width, float point_height, unsigned dpi_x = DEFAULT_DPI, unsigned dpi_y = DEFAULT_DPI);
|
||||
ScaledFont(NonnullRefPtr<Typeface const>, float point_width, float point_height, unsigned dpi_x = DEFAULT_DPI, unsigned dpi_y = DEFAULT_DPI);
|
||||
ScaledFontMetrics metrics() const;
|
||||
|
||||
// ^Gfx::Font
|
||||
|
@ -45,7 +45,7 @@ public:
|
|||
SkFont skia_font(float scale) const;
|
||||
|
||||
private:
|
||||
NonnullRefPtr<Typeface> m_typeface;
|
||||
NonnullRefPtr<Typeface const> m_typeface;
|
||||
float m_x_scale { 0.0f };
|
||||
float m_y_scale { 0.0f };
|
||||
float m_point_width { 0.0f };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue