Renamed the global "ftlib" to gFreeTypeLibrary.

Removed the FTC_Manager for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14627 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-11-02 08:55:51 +00:00
parent fb2d4d51a7
commit 3eba9bd8b3
4 changed files with 9 additions and 12 deletions
+1 -2
View File
@@ -81,8 +81,7 @@ class FontServer : public BLocker {
int32 fNextID; int32 fNextID;
}; };
extern FTC_Manager ftmanager; extern FT_Library gFreeTypeLibrary;
extern FT_Library ftlib;
extern FontServer *gFontServer; extern FontServer *gFontServer;
#endif /* FONTSERVER_H_ */ #endif /* FONTSERVER_H_ */
-2
View File
@@ -17,8 +17,6 @@
const int32 kInvalidFamilyFlags = -1; const int32 kInvalidFamilyFlags = -1;
FTC_Manager ftmanager;
/*! /*!
\brief Constructor \brief Constructor
+7 -7
View File
@@ -24,8 +24,8 @@
#include <new> #include <new>
extern FTC_Manager ftmanager; static FTC_Manager ftmanager;
FT_Library ftlib; FT_Library gFreeTypeLibrary;
FontServer *gFontServer = NULL; FontServer *gFontServer = NULL;
//#define PRINT_FONT_LIST //#define PRINT_FONT_LIST
@@ -40,7 +40,7 @@ face_requester(FTC_FaceID face_id, FT_Library library,
FT_Pointer request_data, FT_Face *aface) FT_Pointer request_data, FT_Face *aface)
{ {
CachedFace face = (CachedFace) face_id; CachedFace face = (CachedFace) face_id;
return FT_New_Face(ftlib, face->file_path.String(), face->face_index,aface); return FT_New_Face(gFreeTypeLibrary, face->file_path.String(), face->face_index,aface);
} }
#endif #endif
@@ -57,7 +57,7 @@ FontServer::FontServer()
fFixed(NULL), fFixed(NULL),
fNextID(0) fNextID(0)
{ {
fInitStatus = FT_Init_FreeType(&ftlib) == 0 ? B_OK : B_ERROR; fInitStatus = FT_Init_FreeType(&gFreeTypeLibrary) == 0 ? B_OK : B_ERROR;
/* /*
Fire up the font caching subsystem. Fire up the font caching subsystem.
@@ -66,7 +66,7 @@ FontServer::FontServer()
these numbers in the future to maximize performance for your "average" these numbers in the future to maximize performance for your "average"
application. application.
*/ */
// if (FTC_Manager_New(ftlib, 0, 0, 0, &face_requester, NULL, &ftmanager) != 0) // if (FTC_Manager_New(gFreeTypeLibrary, 0, 0, 0, &face_requester, NULL, &ftmanager) != 0)
// fInit = false; // fInit = false;
} }
@@ -75,7 +75,7 @@ FontServer::FontServer()
FontServer::~FontServer() FontServer::~FontServer()
{ {
FTC_Manager_Done(ftmanager); FTC_Manager_Done(ftmanager);
FT_Done_FreeType(ftlib); FT_Done_FreeType(gFreeTypeLibrary);
} }
@@ -143,7 +143,7 @@ void
FontServer::_AddFont(BPath &path) FontServer::_AddFont(BPath &path)
{ {
FT_Face face; FT_Face face;
FT_Error error = FT_New_Face(ftlib, path.Path(), 0, &face); FT_Error error = FT_New_Face(gFreeTypeLibrary, path.Path(), 0, &face);
if (error != 0) if (error != 0)
return; return;
@@ -56,7 +56,7 @@ is_white_space(uint16 glyph)
// constructor // constructor
AGGTextRenderer::AGGTextRenderer() AGGTextRenderer::AGGTextRenderer()
: fFontEngine(ftlib), : fFontEngine(gFreeTypeLibrary),
fFontManager(fFontEngine), fFontManager(fFontEngine),
fCurves(fFontManager.path_adaptor()), fCurves(fFontManager.path_adaptor()),