FontCustomPlatformData.h [plain text]
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
#include "TextFlags.h"
#include <windows.h>
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
#include <wtf/text/WTFString.h>
typedef struct CGFont* CGFontRef;
namespace WebCore {
class FontDescription;
class FontPlatformData;
class SharedBuffer;
struct FontSelectionSpecifiedCapabilities;
struct FontVariantSettings;
template <typename T> class FontTaggedSettings;
typedef FontTaggedSettings<int> FontFeatureSettings;
struct FontCustomPlatformData {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
public:
FontCustomPlatformData(HANDLE fontReference, const String& name)
: m_fontReference(fontReference)
, m_name(name)
{
}
~FontCustomPlatformData();
FontPlatformData fontPlatformData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities);
static bool supportsFormat(const String&);
HANDLE m_fontReference;
String m_name;
};
std::unique_ptr<FontCustomPlatformData> createFontCustomPlatformData(SharedBuffer&, const String&);
}
#endif