mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 18:55:54 +08:00
Fix for: 70a9520cc3 (r146291258)
This commit is contained in:
parent
40eee4cae7
commit
8700c12cc0
@ -1090,7 +1090,7 @@ std::unique_ptr<FontFile> Emboss::create_font_file(
|
|||||||
|
|
||||||
std::unique_ptr<FontFile> Emboss::create_font_file(const char *file_path)
|
std::unique_ptr<FontFile> Emboss::create_font_file(const char *file_path)
|
||||||
{
|
{
|
||||||
FILE *file = std::fopen(file_path, "rb");
|
FILE *file = boost::nowide::fopen(file_path, "rb");
|
||||||
if (file == nullptr) {
|
if (file == nullptr) {
|
||||||
assert(false);
|
assert(false);
|
||||||
BOOST_LOG_TRIVIAL(error) << "Couldn't open " << file_path << " for reading.";
|
BOOST_LOG_TRIVIAL(error) << "Couldn't open " << file_path << " for reading.";
|
||||||
|
@ -103,12 +103,13 @@ std::string get_font_filepath() {
|
|||||||
|
|
||||||
// Explicit horror include (used to be implicit) - libslic3r "officialy" does not depend on imgui.
|
// Explicit horror include (used to be implicit) - libslic3r "officialy" does not depend on imgui.
|
||||||
#include "../../bundled_deps/imgui/imgui/imstb_truetype.h" // stbtt_fontinfo
|
#include "../../bundled_deps/imgui/imgui/imstb_truetype.h" // stbtt_fontinfo
|
||||||
|
#include "boost/nowide/cstdio.hpp"
|
||||||
TEST_CASE("Read glyph C shape from font, stb library calls ONLY", "[Emboss]") {
|
TEST_CASE("Read glyph C shape from font, stb library calls ONLY", "[Emboss]") {
|
||||||
std::string font_path = get_font_filepath();
|
std::string font_path = get_font_filepath();
|
||||||
char letter = 'C';
|
char letter = 'C';
|
||||||
|
|
||||||
// Read font file
|
// Read font file
|
||||||
FILE *file = fopen(font_path.c_str(), "rb");
|
FILE *file = boost::nowide::fopen(font_path.c_str(), "rb");
|
||||||
REQUIRE(file != nullptr);
|
REQUIRE(file != nullptr);
|
||||||
// find size of file
|
// find size of file
|
||||||
REQUIRE(fseek(file, 0L, SEEK_END) == 0);
|
REQUIRE(fseek(file, 0L, SEEK_END) == 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user