? Display/display_iostream.h ? SDL/font_sdl.cpp ? SDL/font_sdl.h Index: GL/opengl_target.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.7/Sources/GL/opengl_target.cpp,v retrieving revision 1.6 diff -u -r1.6 opengl_target.cpp --- GL/opengl_target.cpp 30 Aug 2003 13:11:04 -0000 1.6 +++ GL/opengl_target.cpp 15 Jan 2004 15:09:27 -0000 @@ -22,8 +22,10 @@ #include "Display/display_precomp.h" #include "opengl_target.h" #ifdef WIN32 +#include "Display/Win32/font_win32.h" #include "WGL/display_window_opengl.h" #else +#include "GLX/font_x11.h" #include "GLX/display_window_opengl.h" #endif #include "surface_target_opengl.h" @@ -52,6 +54,15 @@ return new CL_Surface_Target_OpenGL(provider, delete_provider, hint); } +CL_Font_Generic *CL_OpenGLTarget::create_font_target() +{ +#ifdef WIN32 + return new CL_Font_Win32; +#else + return new CL_Font_X11; +#endif +} + bool CL_OpenGLTarget::enable_packer() { return true; Index: GL/opengl_target.h =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.7/Sources/GL/opengl_target.h,v retrieving revision 1.7 diff -u -r1.7 opengl_target.h --- GL/opengl_target.h 14 Oct 2003 15:52:12 -0000 1.7 +++ GL/opengl_target.h 15 Jan 2004 15:09:27 -0000 @@ -45,6 +45,8 @@ bool delete_provider, CL_Surface::Hint hint); + virtual CL_Font_Generic* create_font_target(); + virtual bool enable_packer(); //! Implementation: Index: GL/GLX/font_x11.h =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.7/Sources/GL/GLX/font_x11.h,v retrieving revision 1.1 diff -u -r1.1 font_x11.h --- GL/GLX/font_x11.h 15 Jan 2004 01:07:02 -0000 1.1 +++ GL/GLX/font_x11.h 15 Jan 2004 15:09:28 -0000 @@ -22,10 +22,6 @@ #ifndef header_font_x11 #define header_font_x11 -#if _MSC_VER > 1000 -#pragma once -#endif - #include "Display/font_generic.h" class CL_Font_X11 : public CL_Font_Generic Index: Display/display_target.h =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.7/Sources/Display/display_target.h,v retrieving revision 1.8 diff -u -r1.8 display_target.h --- Display/display_target.h 14 Oct 2003 15:52:12 -0000 1.8 +++ Display/display_target.h 15 Jan 2004 15:09:28 -0000 @@ -28,6 +28,7 @@ #include "API/Display/surface.h" +class CL_Font_Generic; class CL_DisplayWindow_Generic; class CL_Surface_Target; @@ -52,6 +53,8 @@ bool delete_provider, CL_Surface::Hint hint)=0; + virtual CL_Font_Generic* create_font_target()=0; + virtual bool enable_packer()=0; //! Implementation: Index: Display/font.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.7/Sources/Display/font.cpp,v retrieving revision 1.64 diff -u -r1.64 font.cpp --- Display/font.cpp 15 Jan 2004 01:40:26 -0000 1.64 +++ Display/font.cpp 15 Jan 2004 15:09:29 -0000 @@ -26,25 +26,17 @@ #include "API/Display/graphic_context.h" #include "API/Display/glyph_buffer.h" #include "API/Display/color.h" -#include "font_generic.h" -#include "resourcedata_font.h" #include "API/Core/Resources/resource_manager.h" #include "API/Core/System/error.h" #include "API/Core/System/clanstring.h" +#include "font_generic.h" +#include "resourcedata_font.h" +#include "display_target.h" #include #include #include #include -#ifdef WIN32 -#include "Win32/font_win32.h" -#define CL_Font_Platform CL_Font_Win32 -#else -// FIXME: this is ugly and will not work well with SDL -#include "GL/GLX/font_x11.h" -#define CL_Font_Platform CL_Font_X11 -#endif - using namespace std; ///////////////////////////////////////////////////////////////////////////// @@ -79,7 +71,7 @@ const string &letter_chars, int space_width, bool monospace) -: impl(new CL_Font_Platform) +: impl(CL_DisplayTarget::current->create_font_target()) { impl->create_font( letters, @@ -96,7 +88,7 @@ bool italic, bool underline, bool strikeout) -: impl(new CL_Font_Platform) +: impl(CL_DisplayTarget::current->create_font_target()) { //First thirty two characters are undrawable in ASCII string letters; @@ -124,7 +116,7 @@ bool italic, bool underline, bool strikeout) -: impl(new CL_Font_Platform) +: impl(CL_DisplayTarget::current->create_font_target()) { impl->create_sysfont( font_name, Index: Display/input_device_generic.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.7/Sources/Display/input_device_generic.cpp,v retrieving revision 1.7 diff -u -r1.7 input_device_generic.cpp --- Display/input_device_generic.cpp 27 Aug 2003 20:52:13 -0000 1.7 +++ Display/input_device_generic.cpp 15 Jan 2004 15:09:29 -0000 @@ -25,10 +25,6 @@ #include "API/Core/System/clanstring.h" #include -#ifndef WIN32 -#include -#endif - ///////////////////////////////////////////////////////////////////////////// // CL_InputDevice_Generic construction: