summaryrefslogtreecommitdiff
path: root/src/fontdetection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fontdetection.cpp')
-rw-r--r--src/fontdetection.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fontdetection.cpp b/src/fontdetection.cpp
index 570e1aa06..dfb27a35d 100644
--- a/src/fontdetection.cpp
+++ b/src/fontdetection.cpp
@@ -344,9 +344,7 @@ static int CALLBACK EnumFontCallback(const ENUMLOGFONTEX *logfont, const NEWTEXT
const char *english_name = font_name;
#endif /* WITH_FREETYPE */
- PLOGFONT os_data = MallocT<LOGFONT>(1);
- *os_data = logfont->elfLogFont;
- info->callback->SetFontNames(info->settings, font_name, os_data);
+ info->callback->SetFontNames(info->settings, font_name, &logfont->elfLogFont);
if (info->callback->FindMissingGlyphs()) return 1;
DEBUG(freetype, 1, "Fallback font: %s (%s)", font_name, english_name);
return 0; // stop enumerating