summaryrefslogtreecommitdiff
path: root/freetype/fontfactoryttf_qws.cpp
authorsandman <sandman>2002-10-22 18:58:52 (UTC)
committer sandman <sandman>2002-10-22 18:58:52 (UTC)
commit3f8157f49267d07a8e3263fedeb4da32ddbc951e (patch) (side-by-side diff)
treeab9e8bac8f0484339f48294709d3eb9288d5783e /freetype/fontfactoryttf_qws.cpp
parentd7cca919f20d602bd755b7690c25e31f6e9520b1 (diff)
downloadopie-3f8157f49267d07a8e3263fedeb4da32ddbc951e.zip
opie-3f8157f49267d07a8e3263fedeb4da32ddbc951e.tar.gz
opie-3f8157f49267d07a8e3263fedeb4da32ddbc951e.tar.bz2
*** empty log message ***
Diffstat (limited to 'freetype/fontfactoryttf_qws.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--freetype/fontfactoryttf_qws.cpp19
1 files changed, 13 insertions, 6 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
@@ -33,11 +33,10 @@
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 {
@@ -69,6 +68,8 @@ public:
~QRenderedFontFT()
{
+ // When inter-process glyph sharing is implemented, the glyph data
+ // for this font can be dereferenced here.
}
bool unicode(int & i) const
@@ -108,7 +109,7 @@ public:
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)
@@ -155,6 +156,12 @@ public:
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;