frankheckenbach / ftgl

fork from http://sourceforge.net/projects/ftgl
Other
28 stars 17 forks source link

Fix for freetype 2.13.3 #18

Open 0-wiz-0 opened 3 months ago

0-wiz-0 commented 3 months ago

With freetype 2.13.3 and an older version of ftgl (but the code is the same in git today) I see:

FTVectoriser.cpp:169:25: error: invalid conversion from 'unsigned char*' to 'char*' [-fpermissive]
         char* tagList = &outline.tags[startIndex];
                         ^~~~~~~~~~~~~~~~~~~~~~~~~

I used

--- src/FTVectoriser.cpp.orig   2024-08-21 19:55:34.860855515 +0000
+++ src/FTVectoriser.cpp
@@ -166,7 +166,7 @@ void FTVectoriser::ProcessContours()
     for(int i = 0; i < ftContourCount; ++i)
     {
         FT_Vector* pointList = &outline.points[startIndex];
-        char* tagList = &outline.tags[startIndex];
+        char* tagList = (char *)&outline.tags[startIndex];

         endIndex = outline.contours[i];
         contourLength =  (endIndex - startIndex) + 1;

to fix the build.

frankheckenbach commented 3 months ago

Note this repo isn't really maintained anymore (see https://github.com/frankheckenbach/ftgl/issues/10). You might want to try this fork: https://github.com/HamzaM3/ftgl