diff --git a/src/MsdfLayer.cpp b/src/MsdfLayer.cpp index 8651ca9..624f8f2 100644 --- a/src/MsdfLayer.cpp +++ b/src/MsdfLayer.cpp @@ -316,7 +316,7 @@ void MsdfLayer::setBoundingBox(const Layer::BoundingBox & boundingBox){ bool MsdfLayer::collectCharacter(const char character, vector & nodes, const ofCamera & camera, - glm::vec4 color, + const vector & colors, ofxVariableLab::FontVariation fontVariation){ OFX_PROFILER_FUNCTION() @@ -372,6 +372,7 @@ bool MsdfLayer::collectCharacter(const char character, glm::vec2 uv3_b = glm::vec2(scale_b.x, 0) + translation_b; for(int i = 0; i < nodes.size(); i++){ + const glm::vec4 & color = colors[i]; ofNode & node = nodes[i]; glm::vec4 p0 = node.getGlobalTransformMatrix() * glm::vec4(0, 0, 0, 1); glm::vec4 p1 = node.getGlobalTransformMatrix() * glm::vec4(0, h, 0, 1); diff --git a/src/MsdfLayer.h b/src/MsdfLayer.h index 4482a87..e51a3b6 100644 --- a/src/MsdfLayer.h +++ b/src/MsdfLayer.h @@ -59,7 +59,7 @@ class MsdfLayer : public Layer { bool collectCharacter(const char character, vector & nodes, const ofCamera & camera, - glm::vec4 color = glm::vec4(1, 1, 1, 1), + const vector & colors, ofxVariableLab::FontVariation fontVariation = ofxVariableLab::FontVariation()); void setAtlas(shared_ptr _atlas);