diff --git a/headers/private/servers/app/FontServer.h b/headers/private/servers/app/FontServer.h index 7f9be97085..a5a66d0d72 100644 --- a/headers/private/servers/app/FontServer.h +++ b/headers/private/servers/app/FontServer.h @@ -81,8 +81,7 @@ class FontServer : public BLocker { int32 fNextID; }; -extern FTC_Manager ftmanager; -extern FT_Library ftlib; +extern FT_Library gFreeTypeLibrary; extern FontServer *gFontServer; #endif /* FONTSERVER_H_ */ diff --git a/src/servers/app/FontFamily.cpp b/src/servers/app/FontFamily.cpp index 41c8801118..558f1c2b1c 100644 --- a/src/servers/app/FontFamily.cpp +++ b/src/servers/app/FontFamily.cpp @@ -17,8 +17,6 @@ const int32 kInvalidFamilyFlags = -1; -FTC_Manager ftmanager; - /*! \brief Constructor diff --git a/src/servers/app/FontServer.cpp b/src/servers/app/FontServer.cpp index 25eb94440c..b23272cc26 100644 --- a/src/servers/app/FontServer.cpp +++ b/src/servers/app/FontServer.cpp @@ -24,8 +24,8 @@ #include -extern FTC_Manager ftmanager; -FT_Library ftlib; +static FTC_Manager ftmanager; +FT_Library gFreeTypeLibrary; FontServer *gFontServer = NULL; //#define PRINT_FONT_LIST @@ -40,7 +40,7 @@ face_requester(FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face *aface) { 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 @@ -57,7 +57,7 @@ FontServer::FontServer() fFixed(NULL), 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. @@ -66,7 +66,7 @@ FontServer::FontServer() these numbers in the future to maximize performance for your "average" 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; } @@ -75,7 +75,7 @@ FontServer::FontServer() FontServer::~FontServer() { FTC_Manager_Done(ftmanager); - FT_Done_FreeType(ftlib); + FT_Done_FreeType(gFreeTypeLibrary); } @@ -143,7 +143,7 @@ void FontServer::_AddFont(BPath &path) { 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) return; diff --git a/src/servers/app/drawing/Painter/font_support/AGGTextRenderer.cpp b/src/servers/app/drawing/Painter/font_support/AGGTextRenderer.cpp index 62ea1da872..832536937c 100644 --- a/src/servers/app/drawing/Painter/font_support/AGGTextRenderer.cpp +++ b/src/servers/app/drawing/Painter/font_support/AGGTextRenderer.cpp @@ -56,7 +56,7 @@ is_white_space(uint16 glyph) // constructor AGGTextRenderer::AGGTextRenderer() - : fFontEngine(ftlib), + : fFontEngine(gFreeTypeLibrary), fFontManager(fFontEngine), fCurves(fFontManager.path_adaptor()),