FontCustomPlatformData.h [plain text]
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
#if USE(CAIRO)
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
typedef struct FT_FaceRec_* FT_Face;
typedef struct _cairo_font_face cairo_font_face_t;
namespace WebCore {
class FontDescription;
class FontPlatformData;
class SharedBuffer;
struct FontCustomPlatformData {
WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
public:
FontCustomPlatformData(FT_Face, SharedBuffer&);
~FontCustomPlatformData();
FontPlatformData fontPlatformData(const FontDescription&, bool bold, bool italic);
static bool supportsFormat(const String&);
private:
cairo_font_face_t* m_fontFace;
};
std::unique_ptr<FontCustomPlatformData> createFontCustomPlatformData(SharedBuffer&, const String&);
}
#endif // USE(CAIRO)
#endif // FontCustomPlatformData_h