mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-17 12:35:54 +08:00
Fix for font Bahnschrift -
Simplify use also pftNonZero
This commit is contained in:
parent
0d686bf91d
commit
24b71ada5e
@ -66,7 +66,7 @@ ExPolygons Emboss::heal_shape(const Polygons &shape) {
|
|||||||
// When edit this code check that font 'ALIENATE.TTF' and glyph 'i' still work
|
// When edit this code check that font 'ALIENATE.TTF' and glyph 'i' still work
|
||||||
// fix of self intersections
|
// fix of self intersections
|
||||||
// http://www.angusj.com/delphi/clipper/documentation/Docs/Units/ClipperLib/Functions/SimplifyPolygon.htm
|
// http://www.angusj.com/delphi/clipper/documentation/Docs/Units/ClipperLib/Functions/SimplifyPolygon.htm
|
||||||
ClipperLib::Paths paths = ClipperLib::SimplifyPolygons(ClipperUtils::PolygonsProvider(shape));
|
ClipperLib::Paths paths = ClipperLib::SimplifyPolygons(ClipperUtils::PolygonsProvider(shape), ClipperLib::pftNonZero);
|
||||||
ClipperLib::CleanPolygons(paths);
|
ClipperLib::CleanPolygons(paths);
|
||||||
Polygons polygons = to_polygons(paths);
|
Polygons polygons = to_polygons(paths);
|
||||||
static const Points pts_2x2({Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 1)});
|
static const Points pts_2x2({Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 1)});
|
||||||
@ -82,6 +82,10 @@ ExPolygons Emboss::heal_shape(const Polygons &shape) {
|
|||||||
polygons.push_back(rect_3x3);
|
polygons.push_back(rect_3x3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TTF use non zero winding number
|
||||||
|
// https://docs.microsoft.com/en-us/typography/opentype/spec/ttch01
|
||||||
|
// https://developer.apple.com/fonts/TrueType-Reference-Manual/RM01/Chap1.html
|
||||||
ExPolygons res = Slic3r::union_ex(polygons, ClipperLib::pftNonZero);
|
ExPolygons res = Slic3r::union_ex(polygons, ClipperLib::pftNonZero);
|
||||||
|
|
||||||
Slic3r::Polygons holes;
|
Slic3r::Polygons holes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user