FontCustomPlatformData.h [plain text]
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
#include "FontDescription.h"
#include "FontRenderingMode.h"
#include "FontWidthVariant.h"
#include <wtf/Noncopyable.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class FontPlatformData;
class CachedFont;
class SharedBuffer;
class CustomFontCache {
public:
virtual bool registerFont(const String& fontName, const SharedBuffer*) = 0;
virtual void unregisterFont(const String& fontName) = 0;
};
struct FontCustomPlatformData {
WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
public:
FontCustomPlatformData(const String& name)
: m_name(name)
{
}
~FontCustomPlatformData();
FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
static bool supportsFormat(const String&);
String m_name;
};
FontCustomPlatformData* createFontCustomPlatformData(const SharedBuffer*);
void setCustomFontCache(CustomFontCache*);
}
#endif