diff options
| author | Mirrorbot <mirrorbot@cogarr.net> | 2025-12-27 17:53:06 -0600 |
|---|---|---|
| committer | Mirrorbot <mirrorbot@cogarr.net> | 2025-12-27 17:53:06 -0600 |
| commit | 71e94ee161447b84c0eaabf6567f8fa62262cd3e (patch) | |
| tree | 391064cc6173a6fe75069af2fdc1978af12f623e /tools/IrrFontTool/newFontTool/CFontTool.h | |
| download | irrlicht-master.tar.gz irrlicht-master.tar.bz2 irrlicht-master.zip | |
Diffstat (limited to 'tools/IrrFontTool/newFontTool/CFontTool.h')
| -rw-r--r-- | tools/IrrFontTool/newFontTool/CFontTool.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/tools/IrrFontTool/newFontTool/CFontTool.h b/tools/IrrFontTool/newFontTool/CFontTool.h new file mode 100644 index 0000000..5a35938 --- /dev/null +++ b/tools/IrrFontTool/newFontTool/CFontTool.h @@ -0,0 +1,78 @@ +#ifndef __IRR_FONT_TOOL_INCLUDED__
+#define __IRR_FONT_TOOL_INCLUDED__
+
+
+#include "irrlicht.h"
+
+#if defined(_IRR_WINDOWS_)
+ #ifdef _MBCS
+ #undef _MBCS
+ #endif
+
+ #define UNICODE
+ #define _WIN32_WINNT 0x0500
+ #include "windows.h"
+#else
+ #ifdef _IRR_COMPILE_WITH_X11_
+ #include <X11/Xlib.h>
+ #endif
+ #include <X11/Xft/Xft.h>
+ #include <set>
+#endif
+
+
+namespace irr {
+ class CFontTool : public irr::IReferenceCounted
+ {
+ public:
+ CFontTool(irr::IrrlichtDevice* device);
+ ~CFontTool();
+
+ virtual bool makeBitmapFont(u32 fontIndex, u32 charsetIndex,
+ s32 fontSize, u32 texturewidth, u32 textureHeight,
+ bool bold, bool italic, bool aa, bool alpha);
+
+ virtual bool saveBitmapFont(const c8* filename, const c8* format);
+
+ virtual void selectCharSet(u32 currentCharSet);
+
+ struct SFontArea
+ {
+ SFontArea() : rectangle(), underhang(0), overhang(0), sourceimage(0) {}
+ core::rect<s32> rectangle;
+ s32 underhang;
+ s32 overhang;
+ u32 sourceimage;
+ };
+
+ /* struct SFontMap
+ {
+ SFontMap() : areas(), start(0), count(0) {}
+ core::array< SFontArea > areas;
+ s32 start;
+ s32 count;
+ };*/
+
+
+
+ core::array<core::stringw> FontNames;
+ core::array<core::stringw> CharSets;
+ //core::array<SFontMap> Mappings;
+ core::array<SFontArea> Areas;
+ core::map<wchar_t, u32> CharMap;
+
+ core::array<video::ITexture*> currentTextures;
+ core::array<video::IImage*> currentImages;
+ const int *FontSizes;
+ IrrlichtDevice *Device;
+
+ bool UseAlphaChannel;
+
+ // windows
+ #ifdef _IRR_WINDOWS_
+ HDC dc;
+ #endif
+
+ };
+}
+#endif // __IRR_FONT_TOOL_INCLUDED__
|
