From 9ebfc456b93f162493a3b5699a35aed58cb9e6b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 5 Jul 2013 18:27:20 +0200 Subject: [PATCH] MagnumFont: no need to use DistanceFieldGlyphCache. We are providing already done font with parameters that GlyphCache can handle. Moreover in ES DistanceFieldGlyphCache might expect RGB input images because Luminance is not renderable in most cases, thus it wouldn't work with Luminance TGA input. --- src/Plugins/MagnumFont/MagnumFont.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Plugins/MagnumFont/MagnumFont.cpp b/src/Plugins/MagnumFont/MagnumFont.cpp index b526a4fc3..1880f1332 100644 --- a/src/Plugins/MagnumFont/MagnumFont.cpp +++ b/src/Plugins/MagnumFont/MagnumFont.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include "TgaImporter/TgaImporter.h" @@ -162,11 +162,11 @@ Vector2 MagnumFont::doGlyphAdvance(const UnsignedInt glyph) { GlyphCache* MagnumFont::doCreateGlyphCache() { /* Set cache image */ - auto cache = new Text::DistanceFieldGlyphCache( + auto cache = new Text::GlyphCache( _opened->conf.value("originalImageSize"), _opened->image.size(), - _opened->conf.value("padding").min()); - cache->setDistanceFieldImage({}, _opened->image); + _opened->conf.value("padding")); + cache->setImage({}, _opened->image); /* Fill glyph map */ const std::vector glyphs = _opened->conf.groups("glyph");