mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
Added support for loading BMFont bitmap font files with love.graphics.newFont (see issue #190.) Some esoteric BMFont features are not supported.
Moved the Font module Lua wrapper code out of the freetype implementation folder. --HG-- branch : minor
This commit is contained in:
+13
-7
@@ -24,11 +24,13 @@
|
||||
// LOVE
|
||||
#include "Rasterizer.h"
|
||||
#include "image/ImageData.h"
|
||||
#include "filesystem/FileData.h"
|
||||
#include "common/Module.h"
|
||||
#include "common/int.h"
|
||||
|
||||
// STD
|
||||
// C++
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace love
|
||||
{
|
||||
@@ -42,16 +44,20 @@ public:
|
||||
|
||||
virtual ~Font() {}
|
||||
|
||||
// Implements Module.
|
||||
virtual ModuleType getModuleType() const { return M_FONT; }
|
||||
virtual Rasterizer *newRasterizer(love::filesystem::FileData *data) = 0;
|
||||
|
||||
virtual Rasterizer *newTrueTypeRasterizer(love::filesystem::FileData *data, int size) = 0;
|
||||
|
||||
virtual Rasterizer *newBMFontRasterizer(love::filesystem::FileData *fontdef, const std::vector<image::ImageData *> &images) = 0;
|
||||
|
||||
virtual Rasterizer *newImageRasterizer(love::image::ImageData *data, const std::string &glyphs) = 0;
|
||||
virtual Rasterizer *newImageRasterizer(love::image::ImageData *data, uint32 *glyphs, int length) = 0;
|
||||
|
||||
virtual Rasterizer *newRasterizer(Data *data, int size) = 0;
|
||||
virtual Rasterizer *newRasterizer(love::image::ImageData *data, const std::string &glyphs) = 0;
|
||||
virtual Rasterizer *newRasterizer(love::image::ImageData *data, uint32 *glyphs, int length) = 0;
|
||||
virtual GlyphData *newGlyphData(Rasterizer *r, const std::string &glyph) = 0;
|
||||
virtual GlyphData *newGlyphData(Rasterizer *r, uint32 glyph) = 0;
|
||||
|
||||
// Implement Module
|
||||
// Implement Module.
|
||||
virtual ModuleType getModuleType() const { return M_FONT; }
|
||||
virtual const char *getName() const = 0;
|
||||
|
||||
}; // Font
|
||||
|
||||
Reference in New Issue
Block a user