summaryrefslogtreecommitdiff
path: root/indra/llrender/llfontfreetype.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2022-11-06 16:25:35 +0100
committerKitty Barnett <develop@catznip.com>2022-11-06 16:25:35 +0100
commit24bd7b2311e6fdd8bcf0a223d6dafaf4266ca4c7 (patch)
treea7af2494d943721f11adaf8d66d47de3c63a6353 /indra/llrender/llfontfreetype.cpp
parentbab70f6f152952ce755188d29bea1cfd8821a4be (diff)
Add support for OT-SVG fonts
Diffstat (limited to 'indra/llrender/llfontfreetype.cpp')
-rw-r--r--indra/llrender/llfontfreetype.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index 25740a5f87..d3a49339da 100644
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
@@ -34,6 +34,7 @@
#ifdef LL_WINDOWS
#include <freetype2\freetype\ftsystem.h>
#endif
+#include "llfontfreetypesvg.h"
// For some reason, this won't work if it's not wrapped in the ifdef
#ifdef FT_FREETYPE_H
@@ -51,6 +52,8 @@
#include "llfontbitmapcache.h"
#include "llgl.h"
+#define ENABLE_OT_SVG_SUPPORT
+
FT_Render_Mode gFontRenderMode = FT_RENDER_MODE_NORMAL;
LLFontManager *gFontManagerp = NULL;
@@ -83,6 +86,16 @@ LLFontManager::LLFontManager()
LL_ERRS() << "Freetype initialization failure!" << LL_ENDL;
FT_Done_FreeType(gFTLibrary);
}
+
+#ifdef ENABLE_OT_SVG_SUPPORT
+ SVG_RendererHooks hooks = {
+ LLFontFreeTypeSvgRenderer::OnInit,
+ LLFontFreeTypeSvgRenderer::OnFree,
+ LLFontFreeTypeSvgRenderer::OnRender,
+ LLFontFreeTypeSvgRenderer::OnPresetGlypthSlot,
+ };
+ FT_Property_Set(gFTLibrary, "ot-svg", "svg-hooks", &hooks);
+#endif
}
LLFontManager::~LLFontManager()