author | sandman <sandman> | 2002-10-22 18:58:52 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-22 18:58:52 (UTC) |
commit | 3f8157f49267d07a8e3263fedeb4da32ddbc951e (patch) (side-by-side diff) | |
tree | ab9e8bac8f0484339f48294709d3eb9288d5783e | |
parent | d7cca919f20d602bd755b7690c25e31f6e9520b1 (diff) | |
download | opie-3f8157f49267d07a8e3263fedeb4da32ddbc951e.zip opie-3f8157f49267d07a8e3263fedeb4da32ddbc951e.tar.gz opie-3f8157f49267d07a8e3263fedeb4da32ddbc951e.tar.bz2 |
*** empty log message ***
-rw-r--r-- | freetype/fontfactoryttf_qws.cpp | 19 | ||||
-rw-r--r-- | freetype/fontfactoryttf_qws.h | 3 | ||||
-rw-r--r-- | freetype/freetype.pro | 2 | ||||
-rw-r--r-- | freetype/freetypefactoryimpl.cpp | 2 | ||||
-rw-r--r-- | freetype/opie-freetype.control | 2 |
5 files changed, 17 insertions, 11 deletions
diff --git a/freetype/fontfactoryttf_qws.cpp b/freetype/fontfactoryttf_qws.cpp index 5aa53fb..1f082a9 100644 --- a/freetype/fontfactoryttf_qws.cpp +++ b/freetype/fontfactoryttf_qws.cpp @@ -32,13 +32,12 @@ #define TRUNC(x) ((x) >> 6) extern "C" { -#include <ft2build.h> -#include FT_FREETYPE_H -#include FT_GLYPH_H -#include FT_OUTLINE_H -#include FT_BBOX_H +#include <freetype/freetype.h> +#include <freetype/ftglyph.h> +#include <freetype/ftoutln.h> +#include <freetype/ftbbox.h> } class QDiskFontFT : public QDiskFontPrivate { public: @@ -68,8 +67,10 @@ public: } ~QRenderedFontFT() { + // When inter-process glyph sharing is implemented, the glyph data + // for this font can be dereferenced here. } bool unicode(int & i) const { @@ -107,9 +108,9 @@ public: err=FT_Load_Glyph(myface,index,FT_LOAD_DEFAULT); if(err) qFatal("Load glyph error %x",err); - int width,height,pitch,size = 0; + int width=0,height=0,pitch=0,size=0; FT_Glyph glyph; err=FT_Get_Glyph( myface->glyph, &glyph ); if(err) qFatal("Get glyph error %x",err); @@ -154,8 +155,14 @@ public: result.metrics->linestep=pitch; result.metrics->width=width; result.metrics->height=height; + // XXX memory manage me + // At some point inter-process glyph data sharing must be implemented + // and the flag below can be set to prevent Qt from deleting the glyph + // data. + // result.metrics->flags = QGlyphMetrics::RendererOwnsData; + FT_Done_Glyph( glyph ); return result; } diff --git a/freetype/fontfactoryttf_qws.h b/freetype/fontfactoryttf_qws.h index 4ba8ce5..208ab61 100644 --- a/freetype/fontfactoryttf_qws.h +++ b/freetype/fontfactoryttf_qws.h @@ -32,10 +32,9 @@ #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 diff --git a/freetype/freetype.pro b/freetype/freetype.pro index 5800b48..ca7edd3 100644 --- a/freetype/freetype.pro +++ b/freetype/freetype.pro @@ -4,8 +4,8 @@ HEADERS = fontfactoryttf_qws.h freetypefactoryimpl.h SOURCES = fontfactoryttf_qws.cpp freetypefactoryimpl.cpp qt2:HEADERS += qfontdata_p.h TARGET = freetypefactory DESTDIR = $(OPIEDIR)/plugins/fontfactories -INCLUDEPATH += $(OPIEDIR)/include +INCLUDEPATH += $(QTDIR)/src/3rdparty/freetype/include $(QTDIR)/src/3rdparty/freetype/include/freetype/config $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lfreetype VERSION = 1.0.0 diff --git a/freetype/freetypefactoryimpl.cpp b/freetype/freetypefactoryimpl.cpp index 71460b2..24fb13a 100644 --- a/freetype/freetypefactoryimpl.cpp +++ b/freetype/freetypefactoryimpl.cpp @@ -47,9 +47,9 @@ QRESULT FreeTypeFactoryImpl::queryInterface( const QUuid &uuid, QUnknownInterfac *iface = this; if ( *iface ) (*iface)->addRef(); - return QS_OK; + return (*iface) ? QS_OK : QS_FALSE; } Q_EXPORT_INTERFACE() { diff --git a/freetype/opie-freetype.control b/freetype/opie-freetype.control index f1ce408..2863adb 100644 --- a/freetype/opie-freetype.control +++ b/freetype/opie-freetype.control @@ -3,6 +3,6 @@ Priority: optional Section: opie/plugins Maintainer: Opie <opie@llornkcor.com> Architecture: arm Version: $QPE_VERSION-$SUB_VERSION -Depends: opie-base ($QPE_VERSION) +Depends: opie-base ($QPE_VERSION), libfreetype6 Description: Freetype fontfactory plugin |