Diffstat (limited to 'freetype/fontfactoryttf_qws.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | freetype/fontfactoryttf_qws.cpp | 4 |
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 @@ | |||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "fontfactoryttf_qws.h" | 21 | #include "fontfactoryttf_qws.h" |
22 | 22 | ||
23 | #include <opie2/odebug.h> | 23 | #include <opie2/odebug.h> |
24 | using namespace Opie::Core; | 24 | using namespace Opie::Core; |
25 | 25 | ||
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 { |
50 | public: | 54 | public: |
51 | QRenderedFontFT(QDiskFont* f, const QFontDef &d) : | 55 | QRenderedFontFT(QDiskFont* f, const QFontDef &d) : |
52 | QRenderedFont(f,d) | 56 | QRenderedFont(f,d) |
53 | { | 57 | { |
54 | QDiskFontFT *df = (QDiskFontFT*)(f->p); | 58 | QDiskFontFT *df = (QDiskFontFT*)(f->p); |
55 | myface=df->face; | 59 | myface=df->face; |
56 | selectThisSize(); | 60 | selectThisSize(); |
57 | // A 1-pixel baseline is excluded in Qt/Windows/X11 fontmetrics | 61 | // A 1-pixel baseline is excluded in Qt/Windows/X11 fontmetrics |
58 | // (see QFontMetrics::height()) | 62 | // (see QFontMetrics::height()) |
59 | // | 63 | // |
60 | fascent=CEIL(myface->size->metrics.ascender)/64; | 64 | fascent=CEIL(myface->size->metrics.ascender)/64; |
61 | fdescent=-FLOOR(myface->size->metrics.descender)/64-1; | 65 | fdescent=-FLOOR(myface->size->metrics.descender)/64-1; |