diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-17 13:31:34 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-17 13:31:34 +0100 |
commit | 24578c9afb61ae65b300dd7fb645220e133089be (patch) | |
tree | c6451ea01a56f0bde33a803ea37169f59d0fc41d /src/crepe/facade/FontFacade.h | |
parent | bcaee968761c1d2e85c20925b237480c87da9747 (diff) | |
parent | 707db8c94b6bb3921105f40658aab13511d8df07 (diff) |
Merge branch 'wouter/text-component' into niels/UI
Diffstat (limited to 'src/crepe/facade/FontFacade.h')
-rw-r--r-- | src/crepe/facade/FontFacade.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/crepe/facade/FontFacade.h b/src/crepe/facade/FontFacade.h index 0e6b7da..2e08f3f 100644 --- a/src/crepe/facade/FontFacade.h +++ b/src/crepe/facade/FontFacade.h @@ -13,16 +13,22 @@ namespace crepe { */ class FontFacade { public: + FontFacade(); + ~FontFacade(); + FontFacade(const FontFacade & other) = delete; + FontFacade & operator=(const FontFacade & other) = delete; + FontFacade(FontFacade && other) noexcept = delete; + FontFacade & operator=(FontFacade && other) noexcept = delete; /** * * \brief Facade function to convert a font_family into an asset. * * This function uses the FontConfig library to convert a font family name (Arial, Inter, Helvetica) and converts it to the font source path. - * This function is static so the member function can be used without create a FontFacade object. This way it can be used in a constructor as FontFacade::get_font_asset(). + * This function returns a default font path if the font_family name doesnt exist or cant be found * \param font_family Name of the font family name. - * \return Asset with filepath to the font. + * \return Asset with filepath to the corresponding font. */ - static Asset get_font_asset(const std::string font_family); + Asset get_font_asset(const std::string& font_family); }; } // namespace crepe |