Control: tags -1 + fixed-upstream
This is the patch upstream has applied in SVN revision 128, with DEP-3
patch tagging metadata.
-- Juhani Numminen
Description: Include Freetype headers in recommended way.
This change should fix <https://sourceforge.net/p/lasi/bugs/2/>. The
change goes a bit beyond the macports patch for the problem linked in
that bug report which was incomplete. (I searched for all occurrences
of #include and freetype in the code base and changed to the standard
form.)
.
Tested on Linux with Freetype version 2.4.9 which implies this change
does not disrupt anything for that Freetype version. A further test
for Freetype version 2.5.1 (which previously could not be used with
libLASi because of the non-standard #includes in the old version
of that code) has been requested.
Origin: http://sourceforge.net/p/lasi/code/182/
Bug: http://sourceforge.net/p/lasi/bugs/2/
Bug-Debian: http://bugs.debian.org/733405
Index: include/LASi.h
===================================================================
--- include/LASi.h (revision 181)
+++ include/LASi.h (revision 182)
@@ -11,7 +11,8 @@
#include <sstream>
#include <map>
#include <pango/pango.h>
-#include <freetype/ftglyph.h>
+#include <ft2build.h>
+#include FT_GLYPH_H
class FreetypeGlyphMgr;
class ContextMgr;
Index: src/glyphMgr.h
===================================================================
--- src/glyphMgr.h (revision 181)
+++ src/glyphMgr.h (revision 182)
@@ -15,9 +15,8 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#include FT_GLYPH_H
-#include <freetype/ftglyph.h>
-
/** Manage FT_Glyph by insuring that FT_Glyph is handled correctly.
*/
class FreetypeGlyphMgr { //: public Manager<FT_GlyphRec*> {
Index: src/drawGlyph.cpp
===================================================================
--- src/drawGlyph.cpp (revision 181)
+++ src/drawGlyph.cpp (revision 182)
@@ -6,7 +6,8 @@
*/
#include <ostream>
-#include <freetype/ftoutln.h>
+#include <ft2build.h>
+#include FT_OUTLINE_H
#include <algorithm>
#include <LASi.h>
#include <config.h>
Index: src/util.h
===================================================================
--- src/util.h (revision 181)
+++ src/util.h (revision 182)
@@ -18,7 +18,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
-#include <freetype/ftglyph.h>
+#include FT_GLYPH_H
std::ostream& operator<<(std::ostream&, const FT_Library);
std::ostream& operator<<(std::ostream&, const FT_Face);
Index: src/drawGlyph.h
===================================================================
--- src/drawGlyph.h (revision 181)
+++ src/drawGlyph.h (revision 182)
@@ -10,7 +10,8 @@
#include <iostream>
#include <pango/pango.h>
-#include <freetype/freetype.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
/** Generate the Postscript commands to draw the glyph
* using the font in pPangoCtx.
Index: src/glyphMgr.cpp
===================================================================
--- src/glyphMgr.cpp (revision 181)
+++ src/glyphMgr.cpp (revision 182)
@@ -10,9 +10,8 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#include FT_GLYPH_H
-#include <freetype/ftglyph.h>
-
#include <cassert>
#include "util.h"
#include "glyphMgr.h"
Index: src/util.cpp
===================================================================
--- src/util.cpp (revision 181)
+++ src/util.cpp (revision 182)
@@ -11,7 +11,6 @@
#include <ft2build.h>
#include FT_FREETYPE_H
-//#include <freetype/freetype.h>
using namespace std;