diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 13:34:19 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 13:34:19 +0100 |
commit | 69ca7fdd738fd4ed98aefc07bab5a43486a55619 (patch) | |
tree | d4c13778166d0ae0a038ca067a64b570df73ffb2 /src/crepe/facade/FontFacade.cpp | |
parent | 34a773eb0f01379419900a3fe26527702146b890 (diff) |
final changes
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 08ff31c..7edfeb8 100644 --- a/src/crepe/facade/FontFacade.cpp +++ b/src/crepe/facade/FontFacade.cpp @@ -6,16 +6,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 == NULL) { |