-rw-r--r-- | freetype/config.in | 2 | ||||
-rw-r--r-- | freetype/fontfactoryttf_qws.cpp | 4 | ||||
-rw-r--r-- | freetype/fontfactoryttf_qws.h | 4 | ||||
-rw-r--r-- | freetype/freetype.pro | 6 |
4 files changed, 14 insertions, 2 deletions
diff --git a/freetype/config.in b/freetype/config.in index 68b659a..16d00eb 100644 --- a/freetype/config.in +++ b/freetype/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config FREETYPE | 1 | config FREETYPE |
2 | boolean "opie-freetype (support for fonts used via the freetype library)" | 2 | boolean "opie-freetype (support for fonts used via the freetype library)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBFREETYPE2_DEP |
diff --git a/freetype/fontfactoryttf_qws.cpp b/freetype/fontfactoryttf_qws.cpp index 1ed0d2c..6d41c33 100644 --- a/freetype/fontfactoryttf_qws.cpp +++ b/freetype/fontfactoryttf_qws.cpp | |||
@@ -26,24 +26,28 @@ using namespace Opie::Core; | |||
26 | #ifdef QT_NO_FREETYPE | 26 | #ifdef QT_NO_FREETYPE |
27 | 27 | ||
28 | #include "qfontdata_p.h" | 28 | #include "qfontdata_p.h" |
29 | #include <string.h> | 29 | #include <string.h> |
30 | #include <stdio.h> | 30 | #include <stdio.h> |
31 | 31 | ||
32 | #define FLOOR(x) ((x) & -64) | 32 | #define FLOOR(x) ((x) & -64) |
33 | #define CEIL(x) (((x)+63) & -64) | 33 | #define CEIL(x) (((x)+63) & -64) |
34 | #define TRUNC(x) ((x) >> 6) | 34 | #define TRUNC(x) ((x) >> 6) |
35 | 35 | ||
36 | 36 | ||
37 | extern "C" { | 37 | extern "C" { |
38 | |||
39 | #include <ft2build.h> | ||
40 | #include FT_FREETYPE_H | ||
41 | |||
38 | #include <freetype/freetype.h> | 42 | #include <freetype/freetype.h> |
39 | #include <freetype/ftglyph.h> | 43 | #include <freetype/ftglyph.h> |
40 | #include <freetype/ftoutln.h> | 44 | #include <freetype/ftoutln.h> |
41 | #include <freetype/ftbbox.h> | 45 | #include <freetype/ftbbox.h> |
42 | } | 46 | } |
43 | 47 | ||
44 | class QDiskFontFT : public QDiskFontPrivate { | 48 | class QDiskFontFT : public QDiskFontPrivate { |
45 | public: | 49 | public: |
46 | FT_Face face; | 50 | FT_Face face; |
47 | }; | 51 | }; |
48 | 52 | ||
49 | class QRenderedFontFT : public QRenderedFont { | 53 | class QRenderedFontFT : public QRenderedFont { |
diff --git a/freetype/fontfactoryttf_qws.h b/freetype/fontfactoryttf_qws.h index ff0fcfc..ddf5b57 100644 --- a/freetype/fontfactoryttf_qws.h +++ b/freetype/fontfactoryttf_qws.h | |||
@@ -24,24 +24,28 @@ | |||
24 | 24 | ||
25 | #include <qfontmanager_qws.h> | 25 | #include <qfontmanager_qws.h> |
26 | #if QT_VERSION >= 0x030000 | 26 | #if QT_VERSION >= 0x030000 |
27 | # include <private/qfontdata_p.h> | 27 | # include <private/qfontdata_p.h> |
28 | #else | 28 | #else |
29 | # include "qfontdata_p.h" | 29 | # include "qfontdata_p.h" |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | 32 | ||
33 | #ifdef QT_NO_FREETYPE | 33 | #ifdef QT_NO_FREETYPE |
34 | 34 | ||
35 | extern "C" { | 35 | extern "C" { |
36 | |||
37 | #include <ft2build.h> | ||
38 | #include FT_FREETYPE_H | ||
39 | |||
36 | #include <freetype/freetype.h> | 40 | #include <freetype/freetype.h> |
37 | } | 41 | } |
38 | 42 | ||
39 | // ascent, descent, width(ch), width(string), maxwidth? | 43 | // ascent, descent, width(ch), width(string), maxwidth? |
40 | // leftbearing, rightbearing, minleftbearing,minrightbearing | 44 | // leftbearing, rightbearing, minleftbearing,minrightbearing |
41 | // leading | 45 | // leading |
42 | 46 | ||
43 | class QFontFactoryFT : public QFontFactory { | 47 | class QFontFactoryFT : public QFontFactory { |
44 | 48 | ||
45 | public: | 49 | public: |
46 | 50 | ||
47 | QFontFactoryFT(); | 51 | QFontFactoryFT(); |
diff --git a/freetype/freetype.pro b/freetype/freetype.pro index c409577..87aaf9e 100644 --- a/freetype/freetype.pro +++ b/freetype/freetype.pro | |||
@@ -1,13 +1,17 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
3 | HEADERS = fontfactoryttf_qws.h freetypefactoryimpl.h | 3 | HEADERS = fontfactoryttf_qws.h freetypefactoryimpl.h |
4 | SOURCES = fontfactoryttf_qws.cpp freetypefactoryimpl.cpp | 4 | SOURCES = fontfactoryttf_qws.cpp freetypefactoryimpl.cpp |
5 | qt2:HEADERS+= qfontdata_p.h | 5 | qt2:HEADERS+= qfontdata_p.h |
6 | TARGET = freetypefactory | 6 | TARGET = freetypefactory |
7 | DESTDIR = $(OPIEDIR)/plugins/fontfactories | 7 | DESTDIR = $(OPIEDIR)/plugins/fontfactories |
8 | INCLUDEPATH+= $(QTDIR)/src/3rdparty/freetype/include $(QTDIR)/src/3rdparty/freetype/include/freetype/config $(OPIEDIR)/include | 8 | INCLUDEPATH+= $(OPIEDIR)/include |
9 | DEPENDPATH += $(OPIEDIR)/include | 9 | DEPENDPATH += $(OPIEDIR)/include |
10 | LIBS += -lqpe -lfreetype -lopiecore2 | 10 | LIBS += -lqpe -lfreetype -lopiecore2 |
11 | VERSION = 1.0.1 | 11 | VERSION = 1.0.1 |
12 | 12 | ||
13 | include( $(OPIEDIR)/include.pro ) | 13 | include( $(OPIEDIR)/include.pro ) |
14 | |||
15 | !isEmpty( LIBFREETYPE2_INC_DIR ) { | ||
16 | INCLUDEPATH = $$LIBFREETYPE2_INC_DIR $$INCLUDEPATH | ||
17 | } | ||