From 482e510d7facc90e382509d763ce1dfb5c6b00eb Mon Sep 17 00:00:00 2001 From: Filip Sykala Date: Wed, 23 Feb 2022 13:29:26 +0100 Subject: [PATCH] Add temporary test for win/mac --- tests/libslic3r/test_emboss.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/libslic3r/test_emboss.cpp b/tests/libslic3r/test_emboss.cpp index 9291a5e6dd..536f3b0436 100644 --- a/tests/libslic3r/test_emboss.cpp +++ b/tests/libslic3r/test_emboss.cpp @@ -94,6 +94,22 @@ Vec3d calc_hit_point(const igl::Hit &h, indexed_triangle_set &its) } } // namespace Private +TEST_CASE("Emboss text - Times MacOs", "[Emboss]") { + + std::string font_path = "C:/Users/filip/Downloads/Times.ttc"; + char letter = 'C'; + float flatness = 2.; + + auto font = Emboss::load_font(font_path.c_str()); + REQUIRE(font != nullptr); + + std::optional glyph = Emboss::letter2glyph(*font, letter, flatness); + REQUIRE(glyph.has_value()); + + ExPolygons shape = glyph->shape; + REQUIRE(!shape.empty()); +} + #include TEST_CASE("Emboss text", "[Emboss]") {