1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
--- encoding.cpp.orig Tue Mar 12 15:40:09 2002
+++ encoding.cpp Sun Mar 21 22:33:00 2004
@@ -2,7 +2,7 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
-#include "freetype/freetype.h"
+#include <ft2build.h>
#include "ttmkfdir.h"
#include "encoding.h"
--- encoding.h.orig Tue Mar 12 15:41:27 2002
+++ encoding.h Sun Mar 21 22:35:15 2004
@@ -6,7 +6,8 @@
#include <map>
#include <string>
-#include "freetype/freetype.h"
+#include <ft2build.h>
+#include FT_FREETYPE_H
#include "util.h"
--- ttf.h.orig Wed Mar 13 19:16:38 2002
+++ ttf.h Sun Mar 21 22:30:16 2004
@@ -3,15 +3,18 @@
#define TTF_H__
#include <string>
-#include "freetype/freetype.h"
-#include "freetype/tttables.h"
-#include "freetype/ftsnames.h"
-#include "freetype/ttnameid.h"
-#include "freetype/fterrors.h"
-#include "freetype/ftmodule.h"
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TRUETYPE_TABLES_H
+#include FT_SFNT_NAMES_H
+#include FT_TRUETYPE_IDS_H
+#include FT_ERRORS_H
+#include FT_MODULE_H
#include "util.h"
#include "encoding.h"
+
+using namespace std;
namespace ttf {
--- Makefile.orig Thu Mar 14 14:03:49 2002
+++ Makefile Sun Jan 22 20:15:17 2006
@@ -1,10 +1,7 @@
-FREETYPE_BASE=/usr/include/freetype2
-FREETYPE_INCL=-I$(FREETYPE_BASE)/.
-FREETYPE_LIB=/usr/lib/libfreetype.so
-
-DEBUG=-ggdb
-CXX=g++
-CXXFLAGS=-Wall -pedantic $(FREETYPE_INCL) $(DEBUG)
+FREETYPE_INCL=`freetype-config --cflags`
+FREETYPE_LIB=`freetype-config --libs`
-LDFLAGS=$(FREETYPE_LIB) $(DEBUG)
+CXXFLAGS+=$(FREETYPE_INCL)
+
+LDFLAGS+=$(FREETYPE_LIB)
@@ -21,3 +18,3 @@
parser.cpp: encoding.l
- flex -i -8 -o$@ $<
+ lex -i -8 -o$@ $<
--- ttf.cpp.orig 2002-11-07 06:30:04.000000000 +0100
+++ ttf.cpp
@@ -226,7 +226,7 @@ Face::FontFamilyName (void) const
for (i = 0; i < n; i++) {
if ((fterror = FT_Get_Sfnt_Name (face, i, &NamePtr)) != FT_Err_Ok) {
std::cout << "Warning: Can't SFNT name : " << FileName << "(" << fterror << ")" << std::endl;
- return;
+ return "unknown";
};
platform = NamePtr.platform_id;
encoding = NamePtr.encoding_id;
|