author | ar <ar> | 2005-01-22 21:53:54 (UTC) |
---|---|---|
committer | ar <ar> | 2005-01-22 21:53:54 (UTC) |
commit | 687b18f07228aac2b168ea5e3204c1c3518929a7 (patch) (side-by-side diff) | |
tree | 485b49ef6150e7aad4bde0a942c0b17d863b240c /freetype | |
parent | 6d08fa658ab487426eebe934fdd92cd3bbb925b3 (diff) | |
download | opie-687b18f07228aac2b168ea5e3204c1c3518929a7.zip opie-687b18f07228aac2b168ea5e3204c1c3518929a7.tar.gz opie-687b18f07228aac2b168ea5e3204c1c3518929a7.tar.bz2 |
- build opie-freetype against freetype2
you must specified <prefix>/include/freetype2 in dependencies menu (make menuconfig)
-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 @@ config FREETYPE boolean "opie-freetype (support for fonts used via the freetype library)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE + 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 @@ -14,48 +14,52 @@ ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "fontfactoryttf_qws.h" #include <opie2/odebug.h> using namespace Opie::Core; #ifdef QT_NO_FREETYPE #include "qfontdata_p.h" #include <string.h> #include <stdio.h> #define FLOOR(x) ((x) & -64) #define CEIL(x) (((x)+63) & -64) #define TRUNC(x) ((x) >> 6) extern "C" { + +#include <ft2build.h> +#include FT_FREETYPE_H + #include <freetype/freetype.h> #include <freetype/ftglyph.h> #include <freetype/ftoutln.h> #include <freetype/ftbbox.h> } class QDiskFontFT : public QDiskFontPrivate { public: FT_Face face; }; class QRenderedFontFT : public QRenderedFont { public: QRenderedFontFT(QDiskFont* f, const QFontDef &d) : QRenderedFont(f,d) { QDiskFontFT *df = (QDiskFontFT*)(f->p); myface=df->face; selectThisSize(); // A 1-pixel baseline is excluded in Qt/Windows/X11 fontmetrics // (see QFontMetrics::height()) // fascent=CEIL(myface->size->metrics.ascender)/64; fdescent=-FLOOR(myface->size->metrics.descender)/64-1; 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 @@ -12,48 +12,52 @@ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef FONTFACTORY_FT_H #define FONTFACTORY_FT_H #include <qfontmanager_qws.h> #if QT_VERSION >= 0x030000 # include <private/qfontdata_p.h> #else # include "qfontdata_p.h" #endif #ifdef QT_NO_FREETYPE extern "C" { + +#include <ft2build.h> +#include FT_FREETYPE_H + #include <freetype/freetype.h> } // ascent, descent, width(ch), width(string), maxwidth? // leftbearing, rightbearing, minleftbearing,minrightbearing // leading class QFontFactoryFT : public QFontFactory { public: QFontFactoryFT(); virtual ~QFontFactoryFT(); QRenderedFont * get(const QFontDef &,QDiskFont *); virtual void load(QDiskFont *) const; virtual QString name(); private: friend class QRenderedFontFT; FT_Library library; }; 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 @@ TEMPLATE = lib CONFIG += qt warn_on HEADERS = fontfactoryttf_qws.h freetypefactoryimpl.h SOURCES = fontfactoryttf_qws.cpp freetypefactoryimpl.cpp qt2:HEADERS += qfontdata_p.h TARGET = freetypefactory DESTDIR = $(OPIEDIR)/plugins/fontfactories -INCLUDEPATH += $(QTDIR)/src/3rdparty/freetype/include $(QTDIR)/src/3rdparty/freetype/include/freetype/config $(OPIEDIR)/include +INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lfreetype -lopiecore2 VERSION = 1.0.1 include( $(OPIEDIR)/include.pro ) + +!isEmpty( LIBFREETYPE2_INC_DIR ) { + INCLUDEPATH = $$LIBFREETYPE2_INC_DIR $$INCLUDEPATH +} |