Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2019-03-27 14:02:50 +0300
committerEnrico Turri <enricoturri@seznam.cz>2019-03-27 14:02:50 +0300
commit8ea8eb67e46b019febcbf5c77f5f4e9786aab57e (patch)
tree18c4f66c48f8aea37f70ca03c8187b574425e7b4 /src/slic3r/GUI/GLTexture.cpp
parent8dbbfc140be7fdffae276af475b6c30b99b306dc (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.cpp4
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");