diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-17 13:36:35 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-17 13:36:35 +0100 |
commit | 31fe4b1d44a7a7114c7ef8c0c5310a6070214cb2 (patch) | |
tree | 14564711f3ce996ccb1000e3f4f07d265e6fab88 /src/crepe/facade/FontFacade.cpp | |
parent | 0c02511f6a64766174cb0db3beb4cc159d3efdf7 (diff) | |
parent | 69ca7fdd738fd4ed98aefc07bab5a43486a55619 (diff) |
Merge branch 'wouter/text-component' into niels/UI
Diffstat (limited to 'src/crepe/facade/FontFacade.cpp')
-rw-r--r-- | src/crepe/facade/FontFacade.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/crepe/facade/FontFacade.cpp b/src/crepe/facade/FontFacade.cpp index 9919032..cec3507 100644 --- a/src/crepe/facade/FontFacade.cpp +++ b/src/crepe/facade/FontFacade.cpp @@ -7,16 +7,14 @@ using namespace crepe; using namespace std; -FontFacade::FontFacade(){ +FontFacade::FontFacade() { if (!FcInit()) { throw runtime_error("Failed to initialize Fontconfig."); } } -FontFacade::~FontFacade(){ - FcFini(); -} -Asset FontFacade::get_font_asset(const string& font_family) { - +FontFacade::~FontFacade() { FcFini(); } +Asset FontFacade::get_font_asset(const string & font_family) { + // Create a pattern to search for the font family FcPattern * pattern = FcNameParse(reinterpret_cast<const FcChar8 *>(font_family.c_str())); if (!pattern) { |