mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +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
|
@ -320,9 +320,9 @@ public:
|
|||
virtual ~FontLoader() override;
|
||||
|
||||
Vector<Gfx::UnicodeRange> const& unicode_ranges() const { return m_unicode_ranges; }
|
||||
RefPtr<Gfx::Typeface> vector_font() const { return m_vector_font; }
|
||||
RefPtr<Gfx::Typeface const> vector_font() const { return m_vector_font; }
|
||||
|
||||
RefPtr<Gfx::Font> font_with_point_size(float point_size);
|
||||
RefPtr<Gfx::Font const> font_with_point_size(float point_size);
|
||||
void start_loading_next_url();
|
||||
|
||||
bool is_loading() const { return resource() && resource()->is_pending(); }
|
||||
|
@ -334,12 +334,12 @@ private:
|
|||
|
||||
void resource_did_load_or_fail();
|
||||
|
||||
ErrorOr<NonnullRefPtr<Gfx::Typeface>> try_load_font();
|
||||
ErrorOr<NonnullRefPtr<Gfx::Typeface const>> try_load_font();
|
||||
|
||||
StyleComputer& m_style_computer;
|
||||
FlyString m_family_name;
|
||||
Vector<Gfx::UnicodeRange> m_unicode_ranges;
|
||||
RefPtr<Gfx::Typeface> m_vector_font;
|
||||
RefPtr<Gfx::Typeface const> m_vector_font;
|
||||
Vector<::URL::URL> m_urls;
|
||||
Function<void(FontLoader const&)> m_on_load;
|
||||
Function<void()> m_on_fail;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue