diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-21 18:59:15 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-21 18:59:15 +1000 |
commit | f2e64e17527f16966a37c788ca65e1e88bf44907 (patch) | |
tree | 359ff507a1885bda2f085062bacbcc9ae4dd4f57 /source/rendering/StarFontTextureGroup.cpp | |
parent | d08b3c3b229cded61f3abe4efb44329fa762a93a (diff) |
Font improvements
?border and ?outline blend nicer when applied to font glyphs
Diffstat (limited to 'source/rendering/StarFontTextureGroup.cpp')
-rw-r--r-- | source/rendering/StarFontTextureGroup.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/rendering/StarFontTextureGroup.cpp b/source/rendering/StarFontTextureGroup.cpp index 7517c8b..340a389 100644 --- a/source/rendering/StarFontTextureGroup.cpp +++ b/source/rendering/StarFontTextureGroup.cpp @@ -21,7 +21,12 @@ const FontTextureGroup::GlyphTexture& FontTextureGroup::glyphTexture(String::Cha Image image = m_font->render(c); if (!processingDirectives.empty()) { Vec2F preSize = Vec2F(image.size()); - image = processImageOperations(parseImageOperations(processingDirectives), image); + auto imageOperations = parseImageOperations(processingDirectives); + for (auto& imageOp : imageOperations) { + if (auto border = imageOp.ptr<BorderImageOperation>()) + border->includeTransparent = true; + } + image = processImageOperations(imageOperations, image); res.first->second.processingOffset = preSize - Vec2F(image.size()); } else |