summaryrefslogtreecommitdiff
path: root/freetype/fontfactoryttf_qws.cpp
authorar <ar>2005-01-22 21:53:54 (UTC)
committer ar <ar>2005-01-22 21:53:54 (UTC)
commit687b18f07228aac2b168ea5e3204c1c3518929a7 (patch) (side-by-side diff)
tree485b49ef6150e7aad4bde0a942c0b17d863b240c /freetype/fontfactoryttf_qws.cpp
parent6d08fa658ab487426eebe934fdd92cd3bbb925b3 (diff)
downloadopie-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)
Diffstat (limited to 'freetype/fontfactoryttf_qws.cpp') (more/less context) (show whitespace changes)
-rw-r--r--freetype/fontfactoryttf_qws.cpp4
1 files changed, 4 insertions, 0 deletions
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;