aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/FontFacade.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-17 10:48:43 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-17 10:48:43 +0100
commit3b5b5258b0f46a3492a7fd777908dfb01e15417b (patch)
tree7c712c45cc627a1d7bfcb8ea949e8b0a59214a74 /src/crepe/facade/FontFacade.cpp
parentd63eb7302d05fbe9b4c044ece3444e8ac4e56e02 (diff)
code not working
Diffstat (limited to 'src/crepe/facade/FontFacade.cpp')
-rw-r--r--src/crepe/facade/FontFacade.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/facade/FontFacade.cpp b/src/crepe/facade/FontFacade.cpp
index aa9d00c..d447b6d 100644
--- a/src/crepe/facade/FontFacade.cpp
+++ b/src/crepe/facade/FontFacade.cpp
@@ -6,7 +6,7 @@
using namespace crepe;
using namespace std;
-Asset FontFacade::get_font_asset(const string font_family) {
+Asset FontFacade::get_font_asset(const string& font_family) {
if (!FcInit()) {
throw runtime_error("Failed to initialize Fontconfig.");
}
@@ -19,7 +19,7 @@ Asset FontFacade::get_font_asset(const string font_family) {
// Default configuration
FcConfig * config = FcConfigGetCurrent();
if (config == NULL) {
- FcPatternDestroy(pattern);
+ // FcPatternDestroy(pattern);
throw runtime_error("Failed to get current Fontconfig configuration.");
}
@@ -37,7 +37,7 @@ Asset FontFacade::get_font_asset(const string font_family) {
FcChar8 * file_path = nullptr;
if (FcPatternGetString(matched_pattern, FC_FILE, 0, &file_path) != FcResultMatch
|| file_path == NULL) {
- FcPatternDestroy(matched_pattern);
+ // FcPatternDestroy(matched_pattern);
throw runtime_error("Failed to get font file path.");
}