mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 10:17:55 -06:00
Fixed loading of SVG textures from utf-8 paths
This commit is contained in:
parent
8dbbfc140b
commit
8ea8eb67e4
1 changed files with 2 additions and 2 deletions
|
@ -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"))
|
if (!boost::algorithm::iends_with(filename, ".svg"))
|
||||||
continue;
|
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)
|
if (image == nullptr)
|
||||||
continue;
|
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)
|
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)
|
if (image == nullptr)
|
||||||
{
|
{
|
||||||
// printf("Could not open SVG image.\n");
|
// printf("Could not open SVG image.\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue