lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use standard inclusion scheme for FreeType headers. (issue 35580043)


From: lemzwerg
Subject: Re: Use standard inclusion scheme for FreeType headers. (issue 35580043)
Date: Tue, 10 Dec 2013 21:20:54 +0000

Reviewers: dak,

Message:
My patch is very simple, as you can see, just replacing the hardcoded
header paths with macros (this is what I refer as `standard inclusion
scheme') to make it compile.  The `reckless' programming was there
before me, so to say, and I admit that I haven't tried in any way to
make it more elegant.

I fully agree that it makes sense to add

  #include "freetype.hh"

or

  #include <ft2build.h>

where FreeType header macro names are used.


Description:
Use standard inclusion scheme for FreeType headers.

The most recent FreeType release (2.5.1) has changed locations for
header
files.  Using the standard way, this is not visible to applications.

Please review this at https://codereview.appspot.com/35580043/

Affected files (+6, -6 lines):
  M lily/freetype-error.cc
  M lily/freetype.cc
  M lily/open-type-font.cc
  M lily/pango-font.cc
  M lily/ttf.cc


Index: lily/freetype-error.cc
diff --git a/lily/freetype-error.cc b/lily/freetype-error.cc
index 00e5cae3519b28cc8f1314334e25cd3ec3884115..88af76c1ae84ad97b870e016a0c8e1ac432ed90f 100644
--- a/lily/freetype-error.cc
+++ b/lily/freetype-error.cc
@@ -31,7 +31,7 @@ const struct Freetype_error_message
   const char *err_msg;
 } ft_errors[] =

-#include <freetype/fterrors.h>
+#include FT_ERRORS_H

   ;

Index: lily/freetype.cc
diff --git a/lily/freetype.cc b/lily/freetype.cc
index d7d4843ce8be17504b0e132b1fbfde45d71b04d1..55a3fb378095af6a0f7f35f7f3e89d55ad6a550a 100644
--- a/lily/freetype.cc
+++ b/lily/freetype.cc
@@ -20,8 +20,8 @@
 #include "freetype.hh"
 #include "warn.hh"

-#include <freetype/ftoutln.h>
-#include <freetype/ftbbox.h>
+#include FT_OUTLINE_H
+#include FT_BBOX_H

 FT_Library freetype2_library;

Index: lily/open-type-font.cc
diff --git a/lily/open-type-font.cc b/lily/open-type-font.cc
index df6a744d0e42165e6d31837d1b474c16b78c8fc9..837a1f23001772aebe5bec7271c2084b80e82ca4 100644
--- a/lily/open-type-font.cc
+++ b/lily/open-type-font.cc
@@ -23,7 +23,7 @@

 using namespace std;

-#include <freetype/tttables.h>
+#include FT_TRUETYPE_TABLES_H

 #include "dimensions.hh"
 #include "freetype.hh"
Index: lily/pango-font.cc
diff --git a/lily/pango-font.cc b/lily/pango-font.cc
index ee986fc94d76a653256212c0a7e9ab7d80517bbc..b148a5bc08cf52b98849d2c71663859a254813cc 100644
--- a/lily/pango-font.cc
+++ b/lily/pango-font.cc
@@ -22,7 +22,7 @@
 #define PANGO_ENABLE_BACKEND

 #include <pango/pangoft2.h>
-#include <freetype/ftxf86.h>
+#include FT_XFREE86_H

 #include <map>
 #include <cstdio>
Index: lily/ttf.cc
diff --git a/lily/ttf.cc b/lily/ttf.cc
index eaeb67adfb25a46b9dfbd16858a4abd0d1e755b4..6d7f97bf37c4703df35cda3a58673059e34d1159 100644
--- a/lily/ttf.cc
+++ b/lily/ttf.cc
@@ -20,7 +20,7 @@
 #include <cstdio>
 #include "freetype.hh"

-#include <freetype/tttables.h>
+#include FT_TRUETYPE_TABLES_H

 #include "international.hh"
 #include "memory-stream.hh"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]