diff --git a/Libraries/LibGfx/Font/Font.h b/Libraries/LibGfx/Font/Font.h index 0377048a938..a8c389cc0f7 100644 --- a/Libraries/LibGfx/Font/Font.h +++ b/Libraries/LibGfx/Font/Font.h @@ -85,7 +85,7 @@ public: virtual float width(StringView) const = 0; virtual float width(Utf8View const&) const = 0; - virtual FlyString family() const = 0; + virtual FlyString const& family() const = 0; virtual NonnullRefPtr with_size(float point_size) const = 0; diff --git a/Libraries/LibGfx/Font/ScaledFont.h b/Libraries/LibGfx/Font/ScaledFont.h index 24c681da6b5..72a1b632090 100644 --- a/Libraries/LibGfx/Font/ScaledFont.h +++ b/Libraries/LibGfx/Font/ScaledFont.h @@ -37,7 +37,7 @@ public: virtual u8 baseline() const override { return m_point_height; } // FIXME: Read from font virtual float width(StringView) const override; virtual float width(Utf8View const&) const override; - virtual FlyString family() const override { return m_typeface->family(); } + virtual FlyString const& family() const override { return m_typeface->family(); } virtual NonnullRefPtr scaled_with_size(float point_size) const; virtual NonnullRefPtr with_size(float point_size) const override; diff --git a/Libraries/LibGfx/Font/Typeface.h b/Libraries/LibGfx/Font/Typeface.h index 813e17f62ec..5ee8a3e8bbf 100644 --- a/Libraries/LibGfx/Font/Typeface.h +++ b/Libraries/LibGfx/Font/Typeface.h @@ -47,7 +47,7 @@ public: virtual u32 glyph_count() const = 0; virtual u16 units_per_em() const = 0; virtual u32 glyph_id_for_code_point(u32 code_point) const = 0; - virtual FlyString family() const = 0; + virtual FlyString const& family() const = 0; virtual u16 weight() const = 0; virtual u16 width() const = 0; virtual u8 slope() const = 0; diff --git a/Libraries/LibGfx/Font/TypefaceSkia.cpp b/Libraries/LibGfx/Font/TypefaceSkia.cpp index fe55a0f2416..21d8fd1e695 100644 --- a/Libraries/LibGfx/Font/TypefaceSkia.cpp +++ b/Libraries/LibGfx/Font/TypefaceSkia.cpp @@ -114,7 +114,7 @@ void TypefaceSkia::populate_glyph_page(GlyphPage& glyph_page, size_t page_index) } } -FlyString TypefaceSkia::family() const +FlyString const& TypefaceSkia::family() const { if (!m_family.has_value()) { SkString family_name; diff --git a/Libraries/LibGfx/Font/TypefaceSkia.h b/Libraries/LibGfx/Font/TypefaceSkia.h index 38f2a76e569..7a04fe8da57 100644 --- a/Libraries/LibGfx/Font/TypefaceSkia.h +++ b/Libraries/LibGfx/Font/TypefaceSkia.h @@ -19,7 +19,7 @@ public: virtual u32 glyph_count() const override; virtual u16 units_per_em() const override; virtual u32 glyph_id_for_code_point(u32 code_point) const override; - virtual FlyString family() const override; + virtual FlyString const& family() const override; virtual u16 weight() const override; virtual u16 width() const override; virtual u8 slope() const override; diff --git a/Libraries/LibWeb/CSS/ParsedFontFace.h b/Libraries/LibWeb/CSS/ParsedFontFace.h index 308ad3c81be..3fdfc3d98f6 100644 --- a/Libraries/LibWeb/CSS/ParsedFontFace.h +++ b/Libraries/LibWeb/CSS/ParsedFontFace.h @@ -30,7 +30,7 @@ public: Optional ascent_override() const { return m_ascent_override; } Optional descent_override() const { return m_descent_override; } FontDisplay font_display() const { return m_font_display; } - FlyString font_family() const { return m_font_family; } + FlyString const& font_family() const { return m_font_family; } Optional> font_feature_settings() const { return m_font_feature_settings; } Optional font_language_override() const { return m_font_language_override; } Optional font_named_instance() const { return m_font_named_instance; }