diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-03-27 14:02:50 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-03-27 14:02:50 +0300 |
commit | 8ea8eb67e46b019febcbf5c77f5f4e9786aab57e (patch) | |
tree | 18c4f66c48f8aea37f70ca03c8187b574425e7b4 /src/slic3r/GUI/GLTexture.cpp | |
parent | 8dbbfc140be7fdffae276af475b6c30b99b306dc (diff) |
Fixed loading of SVG textures from utf-8 paths
Diffstat (limited to 'src/slic3r/GUI/GLTexture.cpp')
-rw-r--r-- | src/slic3r/GUI/GLTexture.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slic3r/GUI/GLTexture.cpp b/src/slic3r/GUI/GLTexture.cpp index b48ca2044..c1a035754 100644 --- a/src/slic3r/GUI/GLTexture.cpp +++ b/src/slic3r/GUI/GLTexture.cpp @@ -108,7 +108,7 @@ bool GLTexture::load_from_svg_files_as_sprites_array(const std::vector<std::stri if (!boost::algorithm::iends_with(filename, ".svg")) continue; - NSVGimage* image = nsvgParseFromFile(filename.c_str(), "px", 96.0f); + NSVGimage* image = nsvgParseFromFile(encode_path(filename.c_str()).c_str(), "px", 96.0f); if (image == nullptr) continue; @@ -361,7 +361,7 @@ bool GLTexture::load_from_png(const std::string& filename, bool use_mipmaps) bool GLTexture::load_from_svg(const std::string& filename, bool use_mipmaps, unsigned int max_size_px) { - NSVGimage* image = nsvgParseFromFile(filename.c_str(), "px", 96.0f); + NSVGimage* image = nsvgParseFromFile(encode_path(filename.c_str()).c_str(), "px", 96.0f); if (image == nullptr) { // printf("Could not open SVG image.\n"); |