ports/devel/upp/files/patch-uppsrc_Draw_FontFc.cpp
lightside bd21b799f5 devel/upp: Fix build with freetype2 2.13.3
Based on upstream commit 68139e354876013046aac0d1699d7b61ce055d53

Reference:
68139e3548

PR:		281326
Approved by:	portmgr (blanket, build fix)
2024-09-17 20:50:12 +02:00

28 lines
1 KiB
C++

# Draw: Workaround for backwards incompatibility of FT_Outline
# https://github.com/ultimatepp/ultimatepp/commit/68139e354876013046aac0d1699d7b61ce055d53
--- uppsrc/Draw/FontFc.cpp.orig 2020-10-16 9:28:02 UTC
+++ uppsrc/Draw/FontFc.cpp
@@ -290,10 +290,9 @@
FT_Vector v_start;
FT_Vector* point;
FT_Vector* limit;
- char* tags;
int n; // index of contour in outline
- char tag; // current point's state
int first = 0; // index of first point in contour
+
for(n = 0; n < outline.n_contours; n++) {
int last = outline.contours[n];
limit = outline.points + last;
@@ -301,8 +300,8 @@
v_last = outline.points[last];
v_control = v_start;
point = outline.points + first;
- tags = outline.tags + first;
- tag = FT_CURVE_TAG(tags[0]);
+ const auto *tags = outline.tags + first;
+ auto tag = FT_CURVE_TAG(tags[0]);
if(tag == FT_CURVE_TAG_CUBIC) return false;
if(tag == FT_CURVE_TAG_CONIC) {
if(FT_CURVE_TAG(outline.tags[last]) == FT_CURVE_TAG_ON) {